Skip to content

Instantly share code, notes, and snippets.

View 0i0's full-sized avatar
💭
Good times

Léo Hakim 0i0

💭
Good times
View GitHub Profile
@0i0
0i0 / register_subsystem_handler.bat
Created August 13, 2019 13:03
shh:// schema handler for windows using linux subsystem (ubuntu)
reg add HKCR\ssh /ve /t REG_SZ /d "URL:ssh"
reg add HKCR\ssh /v "URL Protocol" /t REG_SZ /d ""
reg add HKCR\ssh\shell\open\command /ve /t REG_EXPAND_SZ /d "%LOCALAPPDATA%\Microsoft\WindowsApps\ubuntu.exe run ssh $(echo %%1| awk -F/ '{print $3}')"
#!/bin/bash
# We need root to install
if [ "$(id -u)" != "0" ]; then
echo "This script must be run as root" 1>&2
exit 1
fi
# In case file exists
if [ -f "/usr/local/bin/ssh-url-handler" ]
then
import re
import io
from configparser import ConfigParser
filename = '/media/lior/Data1/TEMP/005.reg'
def format_mac(macstring):
t = iter(macstring)
return ':'.join(a+b for a,b in zip(t, t)).upper()
# split
split your-zip.zip -b 32M ZIPCHUNKS
# combine
cat ZIPCHUNKS* > reassembled-zip.zip
xprop -id $(xdotool search "Visual Studio Code" | head -n 1) -f _NET_WM_WINDOW_OPACITY 32c -set _NET_WM_WINDOW_OPACITY $(printf 0x%x $((0xffffffff * 93 / 100)))
Xft.dpi: 195
@0i0
0i0 / image-to-v4l2loopback.py
Created September 21, 2018 06:12 — forked from TimSC/image-to-v4l2loopback.py
Send image data to v4l2loopback using python. Remember to do "sudo modprobe v4l2loopback" first! Released under CC0 by Tim Sheerman-Chase, 2013
#Send image data to v4l2loopback using python
#Remember to do sudo modprobe v4l2loopback first!
#Released under CC0 by Tim Sheerman-Chase, 2013
import fcntl, sys, os
from v4l2 import *
import time
import scipy.misc as misc
import numpy as np
msiklm 0xf74808,0x2a751c,0x0e6b99
// 1E272C
{
"workbench.colorTheme": "Material Theme",
"workbench.colorCustomizations": {
"[Material Theme]": {
"editor.background": "#1E272C",
"sideBar.background": "#1E272C",
"sideBar.border": "#1E272C",
@0i0
0i0 / gdown.sh
Last active January 3, 2019 09:23
bash script to download large files from google drive
#!/bin/bash
## description: script to download large files from google drive
## version 0.1
## author: 0i0 (https://github.com/0i0)
usage="$(basename "$0") [-h] link filename-- program to download a file from google drive link
where:
-h show this help text