Skip to content

Instantly share code, notes, and snippets.

View gabrielpetry's full-sized avatar
🎯
Focusing

Gabriel Petry gabrielpetry

🎯
Focusing
View GitHub Profile
@andrewssobral
andrewssobral / disable_leds_rpi3.sh
Last active June 21, 2024 15:20
Disable leds on Raspberry Pi 3 Model B Rev 1.2
# https://raspberrypi.stackexchange.com/questions/117632/turn-off-external-leds-on-raspberry-pi-3
# check model
cat /sys/firmware/devicetree/base/model
# Raspberry Pi 3 Model B Rev 1.2
# Disable Power (red) and Activity (yellow) leds
sudo nano /etc/rc.local
# Add the following lines before `exit 0`:
sudo sh -c 'echo none > /sys/class/leds/led0/trigger'
@gabrielpetry
gabrielpetry / kms
Created February 11, 2021 21:48 — forked from Twolk/kms
KMS server Windows
Online kms host address:
--------
kms.digiboy.ir
54.223.212.31
kms.cnlic.com
kms.chinancce.com
kms.ddns.net
franklv.ddns.net
k.zpale.com
m.zpale.com
@non-static
non-static / status_code_analysis.lua
Last active November 4, 2023 07:56
Lua script for wrk2 to count response code and a particular header
wrk.method = "POST"
local f = io.open("data.json", "r")
wrk.body = f:read("*all")
wrk.headers["Content-Type"] = "application/json"
wrk.headers["Host"] = "foo.bar.net"
local counter = 1
local threads = {}
@jscher2000
jscher2000 / reload_userChrome_css.js
Created July 27, 2019 01:31
Browser Console script to reload userChrome.css
/*
Code to paste and run in the Browser Console
Requires devtools.chrome.enabled => true in about:config
Tested in Firefox 68.0.1 on Windows
*/
// Create references to APIs we'll use
var ss = Cc["@mozilla.org/content/style-sheet-service;1"].getService(Ci.nsIStyleSheetService);
var io = Cc["@mozilla.org/network/io-service;1"].getService(Ci.nsIIOService);
var ds = Cc["@mozilla.org/file/directory_service;1"].getService(Ci.nsIProperties);
@Twolk
Twolk / kms
Created October 27, 2017 22:27 — forked from CHEF-KOCH/KMS_office.cmd
KMS server Windows
Online kms host address:
--------
kms.digiboy.ir
54.223.212.31
kms.cnlic.com
kms.chinancce.com
kms.ddns.net
franklv.ddns.net
k.zpale.com
m.zpale.com
@zeuxisoo
zeuxisoo / gist:3843678
Created October 6, 2012 03:35
Reroute port 80 to 3000 on iptables
sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 3000
sudo iptables-save