This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Lib: JSON.ahk | |
* JSON lib for AutoHotkey. | |
* Version: | |
* v2.1.3 [updated 04/18/2016 (MM/DD/YYYY)] | |
* License: | |
* WTFPL [http://wtfpl.net/] | |
* Requirements: | |
* Latest version of AutoHotkey (v1.1+ or v2.0-a+) | |
* Installation: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
# | |
# wireguard helper script | |
# | |
IP=/sbin/ip | |
if [ "$IF_WG_CONF" -o "$IF_WG_PRIVATE_KEY" ] | |
then | |
$IP link del $IFACE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
from requests_html import HTMLSession | |
import os | |
import sys | |
import urllib | |
from xmlrpc.client import ServerProxy | |
session = HTMLSession() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Don't use 2.4Ghz | |
list ht_capab 'SHORT-GI-40' | |
list ht_capab 'DSSS_CCK-40' | |
list ht_capab 'TX-STBC' | |
list ht_capab 'RX-STBC1' | |
option frag '2304' | |
option rts '2304' | |
option beacon_int '75' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# Credit to frogor for the objc | |
from Foundation import NSBundle | |
import json | |
import objc | |
import os | |
import plistlib | |
import subprocess |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const tpush = require('typcnpush-sdk'); | |
const http = require('http'); | |
tpush.useInternalMode(); | |
setInterval(function(){ | |
let options = { | |
host: 'ume1.umetrip.com', | |
port: 80, | |
path: '/UmeAd/everyday/luck.do?sid=YOUR_SESSION_ID', | |
method: 'GET' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
VERSION="1.0.2" | |
# Interface connect to out lan | |
INTERFACE="eth0" | |
# Interface virtual for incomming traffic | |
VIRTUAL="ifb0" | |
# set the direction (1 = outgoing only, 2 = incoming only 3 = both) | |
DIRECTION=3 | |
# Speed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TARGET="/Volumes/Macintosh HD" # Specify where to configure Recovery partition | |
MACOS_INSTALLER="/Applications/Install\ macOS\ Sierra.app" # Path to your macOS installer | |
# Remaining paths ahead are dependant on OS version | |
# This *should* support 10.9 and above but is only tested on 10.12 | |
curl http://support.apple.com/downloads/DL1464/en_US/RecoveryHDUpdate.dmg -L -o ~/Downloads/RecoveryHDUpdate.dmg | |
hdiutil mount ~/Downloads/RecoveryHDUpdate.dmg | |
pkgutil --expand /Volumes/Mac\ OS\ X\ Lion\ Recovery\ HD\ Update/RecoveryHDUpdate.pkg /tmp/recoveryupdate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function clone::do_clone() { | |
local script="url='$1' | |
print('github' in url or 'bitbucket' in url)" | |
local need_proxy=$(python -c "$script") | |
local proxy="socks5://localhost:1080" | |
if [ "$need_proxy" = "True" ]; then | |
export {https,http,all}_proxy=$proxy | |
git clone "$1" "$2" | |
unset {https,http,all}_proxy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function gen { | |
dd if=/dev/urandom 2>/dev/null | tr -dc a-f0-9 | fold -w $1 | head -n 1 | sed 's/^/0x/' | |
} | |
spi=`gen 8` | |
reqid=`gen 8` | |
auth_key=`gen 64` | |
enc_key=`gen 64` |
NewerOlder