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
""" | |
Example of WebSocket receiving cookies from session. | |
# Currently using tornado==4.0.2 | |
pip install git+http://github.com/tornadoweb/tornado.git | |
Run: | |
python secure_websocket.python | |
and access online: |
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 scknorg_checkmp4(filename){ | |
regex = filename.match(/(.*?).mp4/g); | |
if(regex){ | |
return true; | |
} | |
return false; | |
} |
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
### Localization | |
d-i debian-installer/language string en | |
d-i debian-installer/country string US | |
d-i debian-installer/locale string en_US.UTF-8 | |
# Keyboard selection. | |
d-i console-keymaps-at/keymap select us | |
d-i keyboard-configuration/xkb-keymap select us | |
### Network configuration |
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
xorriso -as mkisofs -r -J -joliet-long -l -cache-inodes \ | |
-isohybrid-mbr /usr/lib/ISOLINUX/isohdpfx.bin -partition_offset 16 -A \ | |
"Debian CustomNetInstall" -b isolinux/isolinux.bin -c isolinux/boot.cat \ | |
-no-emul-boot -boot-load-size 4 -boot-info-table \ | |
-o ~/workspace/netinstall/debian-custom-8.2.0-amd64-netinst.iso ~/workspace/netinstall/cd |
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 | |
echo -e "{\"id\":1,\"method\":\"$1\",\"params\":[$2]}\r\n" |nc 192.168.1.36 55443 | |
# ./yeelight.sh set_power \"on\" | |
# ./yeelight.sh set_power \"off\" | |
# ./yeelight.sh set_bright 1 | |
# ./yeelight.sh set_bright 100 |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" \ | |
"http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>networkchange</string> | |
<key>LowPriorityIO</key> | |
<true/> | |
<key>ProgramArguments</key> |
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 | |
# vim /usr/local/bin/cgw | |
# chmod +x /usr/local/bin/cgw | |
/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I|grep My_Home_SSID >/dev/null || exit 0 | |
route delete default | |
route add default 10.1.1.40 | |
networksetup -setdnsservers Wi-Fi 10.1.1.40 |
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
kubectl get ns | grep Terminating|cut -d " " -f 1|while read NSNAME; do echo $NSNAME;kubectl get namespace $NSNAME -o json|jq ".spec.finalizers = []"|kubectl replace --raw "/api/v1/namespaces/$NSNAME/finalize" -f -;done |
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
document.body.style.backgroundColor = "red"; | |
//document.getElementsByClassName("tyj39b-5")[0].click(); |
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
document.body.style.backgroundColor = "red"; |
OlderNewer