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
curl -O http://example.com/vine.dmg | |
hdiutil attach vine.dmg | |
cd "/Volumes/Vine Server/Vine Server.app" | |
./OSXvnc-server -connectHost example.com |
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 | |
""" | |
To install, you may paste this at your terminal command prompt: | |
mkdir ~/bin | |
wget https://gist.github.com/lukestanley/5922793/raw/hide_firefox_titlebar_on_ubuntu_linux.py | |
mv hide_firefox_titlebar_on_ubuntu_linux.py fixfox; chmod +x fixfox | |
Then, you may simple enter fixfox, to run it. | |
""" |
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
<canvas title="identicon -2044886870" width="48" height="48"></canvas> | |
<script type="text/javascript" src="https://raw.github.com/donpark/identicon/master/identicon-canvas/identicon_canvas.js"></script> | |
<script type="text/javascript" src="https://raw.github.com/Caligatio/jsSHA/master/src/sha1.js"></script> | |
<script>//override existing render func, to not check for prefix | |
function render_identicon_canvases(prefix) { | |
var canvases = document.getElementsByTagName("canvas"); | |
var n = canvases.length; | |
for (var i = 0; i < n; i++) { | |
var node = canvases[i]; |
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
### Keybase proof | |
I hereby claim: | |
* I am lukestanley on github. | |
* I am lukestanley (https://keybase.io/lukestanley) on keybase. | |
* I have a public key whose fingerprint is BD4D EABC 6129 F49E 0701 4384 FEF5 563D F6A6 AD31 | |
To claim this, I am signing this object: |
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
#download mp3 from http://soundbible.com/81-Red-Alert.html | |
from time import sleep #load a delay function | |
from os import system #load the "system" call function | |
import subprocess #load subprocess module | |
maybeRunningAlertSound = False #store if we are playing sounds, we are not yet | |
#Because "True" is always true, this is a good way to run the program forever: | |
while True is True: |
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
def compress_requests_and_responses(app): | |
import gzip | |
@app.middleware('response') | |
async def compress_response(request, response): | |
uncompressed_body_length = len(response.body) | |
wants_gzip = 'gzip' in request.headers['Accept-Encoding'] | |
if (uncompressed_body_length > 0) and wants_gzip: | |
compressed_body = gzip.compress(response.body) | |
compressed_body_length = len(compressed_body) |
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
# Credit to https://stackoverflow.com/a/22722889/122364 | |
import uuid | |
import tkinter as tk | |
from tkinter import ttk | |
def json_tree(tree, parent, dictionary): | |
for key in dictionary: | |
uid = uuid.uuid4() | |
if isinstance(dictionary[key], dict): |
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 simulate_input_event(element) { | |
var event = new Event('input', { bubbles: true }); | |
element.dispatchEvent(event); | |
} | |
document.forms[0][0].value='username'; | |
simulate_input_event(document.forms[0][0]); | |
document.forms[0][1].value='password'; | |
simulate_input_event(document.forms[0][1]); |
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
from os import system as run | |
from random import random | |
import requests | |
from time import sleep | |
def reconnect_wifi(): | |
run("nmcli d connect wlp3s0") | |
run("firefox http://bbc.co.uk/?"+str(random())) | |
def are_we_connected(): |
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
# With Termux installed, something like this should work | |
# to type less, you might be able to copy and paste this, | |
# or use Curl / wget | |
# First enable file access permission: | |
termux-setup-storage # accept file access as prompted | |
pkg install clang cmake python openssh libsodium | |
SODIUM_INSTALL=system pip install pynacl # skip building bundled version | |
pip install magic-wormhole | |
sshd | |
wormhole ssh invite # follow directions |
OlderNewer