Skip to content

Instantly share code, notes, and snippets.

@XPlantefeve
XPlantefeve / WinHttpProxySettings.ps1
Last active April 29, 2024 16:29
netsh winhttp * proxy, but in PowerShell
# Quick & dirty. Basic error checking. It works where I needed it.
#
# Documentation used:
# - ProcMon
# - https://securelink.be/blog/windows-proxy-settings-explained/
# - https://docs.microsoft.com/en-us/windows/desktop/api/Winhttp/ns-winhttp-__unnamed_struct_3
# - https://github.com/vbfox/proxyconf/blob/master/README.md
# - https://community.idera.com/database-tools/powershell/powertips/b/tips/posts/managing-bit-flags-part-1
# - https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_enum
#
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active April 29, 2024 16:26
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@ynagatomo
ynagatomo / Extension+ModelComponent.swift
Created April 29, 2024 11:48
An extension of ModelComponent, to dump its MeshResource.Model such as positions and normals.
extension ModelComponent {
/// Dump the MeshResource.Model
func dumpMeshResourceModel() {
let printSIMD3Float = { (value: SIMD3<Float>) in
print("(\(value.x), \(value.y), \(value.z)), ", terminator: "")
}
let printSIMD2Float = { (value: SIMD2<Float>) in
print("(\(value.x), \(value.y)), ", terminator: "")
}
@ibrahimhajjaj
ibrahimhajjaj / open_folder_in_PhpStorm_2020.bat
Last active April 29, 2024 16:24
Add Open Folder in PHPStorm to Windows Context Menu
@echo off
SET PhpStormPath=C:\Program Files\JetBrains\PhpStorm 2020.3.3\bin\phpstorm64.exe
echo Adding file entries
@reg add "HKEY_CLASSES_ROOT\*\shell\PhpStorm" /t REG_SZ /v "" /d "Open in PhpStorm" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\PhpStorm" /t REG_EXPAND_SZ /v "Icon" /d "%PhpStormPath%,0" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\PhpStorm\command" /t REG_SZ /v "" /d "%PhpStormPath% \"%%1\"" /f
echo Adding within a folder entries
@bbbenji
bbbenji / bambu_lab-automations.yaml
Last active April 29, 2024 16:22
Bambu Lab X1C Home Assistant Automations
###
# Toggle an external light from the X1C screen
###
alias: Bambu Lab - Auto External Light
description: ""
trigger:
- platform: state
entity_id:
- light.x1c_chamber_light
from: null
@mbierman
mbierman / randommac.sh
Last active April 29, 2024 16:22
This allows you to create and assign any MAC address you like for macOS Wi-Fi or Ethernet connections. If you don’t supply one a random mac will be created for you.
#!/bin/bash
# v 1.0.2
# https://gist.github.com/mbierman/03b2a962ac04963ef5bbc8354d0ed5d1
# 2022 mbierman
sleep="${1:-5}"
regex="^([0-9A-F]{2}[:]){5}([0-9A-F]{2})$"
getmac () {
rnd=$(openssl rand -hex 6 | sed 's/\(..\)\(..\)\(..\)\(..\)\(..\)\(..\)/\1:\2:\3:\4:\5:\6/')
@yejun
yejun / how_to_bluetooth.md
Last active April 29, 2024 16:20
Use pulseaudio as bluetooth speaker on archlinux

Install packages

  • bluez
  • bluez-utils
  • pulseaudio-bluetooth

Enable bluetooth

Edit /etc/bluetooth/main.conf, uncomment following lines

@denisgolius
denisgolius / generate-ssh-key.sh
Created October 4, 2018 06:55 — forked from grenade/01-generate-ed25519-ssh-key.sh
Correct file permissions for ssh keys and config.
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/id_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/github_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/mozilla_rsa
@Akhil-Suresh
Akhil-Suresh / postman_installation.md
Last active April 29, 2024 16:18
Installing Postman on Ubuntu/Debian

Installing Postman

Step 1

If any version of postman is installed we need to remove it

sudo rm -rf /opt/Postman

Step 2

@devomman
devomman / office-activation.md
Created May 30, 2023 11:01
Office Activation Command by Omman

Office 2021

Method 1: Using my command line

Step 1.1: Open cmd program with administrator rights.

  • First, you need to open cmd in the admin mode, then run all commands below one by one.

Step 1.2: Get into the Office directory in cmd.

  • For x86 and x64
cd /d %ProgramFiles(x86)%\Microsoft Office\Office16
cd /d %ProgramFiles%\Microsoft Office\Office16