Skip to content

Instantly share code, notes, and snippets.

#git prompt
COLOR_RED="\033[0;31m"
COLOR_YELLOW="\033[0;33m"
COLOR_GREEN="\033[0;32m"
COLOR_OCHRE="\033[38;5;95m"
COLOR_BLUE="\033[0;34m"
COLOR_WHITE="\033[0;37m"
COLOR_RESET="\033[0m"
git_color()
@supermitsuba
supermitsuba / gist:3955154a4afcf4b8c3668a63a6a1bf38
Last active November 20, 2016 09:37
Computer Science CSV
question,answer
What is the Quicksort Implementation?," public static void sort(int[] a){
sortImpl(a, 0, a.Length-1);
}
public static void sortImpl(int[] a, int left, int right){
var i = left;
var j = right;
var pivot = a[(left+right)/2];
a,b
c,d
y,z
w,x
Steps:
1. Install driver from http://zadig.akeo.ie/
a. Note that you want the device in boot loader mode (fn+k is default)
b. also note that you want to select libusb-win32 (vx.x.x.x)
2. That will install the drivers
3. Next download https://github.com/qmk/qmk_toolbox/releases
4. Go build the keyboard layout like you would from the README.md : https://github.com/qmk/qmk_firmware/tree/master/keyboards/xd75
5. Take your .hex file and put that into local file text box.
6. The microcontroller should be atmega32u4
@supermitsuba
supermitsuba / Sublime Text.txt
Last active December 11, 2019 18:43
Text Editor Plugins
Babel
pymdownx
backrefs
python-jinja2
ColorPicker
python-markdown
'Colorsublime - Themes'
PyV8
'Gutter Color'
pyyaml
@supermitsuba
supermitsuba / server.txt
Created December 24, 2019 14:44
pihole blocked values
p.ads.roku.com
tyler.logs.roku.com
giga.logs.roku.com
cooper.logs.roku.com
cloudservices.roku.com
assets.sr.roku.com
prod.mobile.roku.com
wwwimg.roku.com
amoeba.web.roku.com
austin.logs.roku.com
import threading
import datetime
import time
import os
from gpiozero import MotionSensor
pir = MotionSensor(4)
current_time = datetime.datetime.now()
diff = datetime.datetime.now() - current_time
os.system('./monitor_off.sh')
#!/bin/bash
argon_create_file() {
if [ -f $1 ]; then
sudo rm $1
fi
sudo touch $1
sudo chmod 666 $1
}
@supermitsuba
supermitsuba / disable_services.ps1
Last active November 20, 2023 17:58
Disable all Asus Services
# This command will give you a list of all the services.txt
# Use this list to look at all the service names and use the
# Service name to put a new service to stop.txt
#
# Gets all services:
# sc queryex state=all type=service
#
# Stops service:
# Stop-Service -Name "<Service Name>"
#