View dive.sh
dive() { | |
start=$PWD | |
if [ -z "$1" ] || [ ! -d "$1" ]; then | |
return 1 | |
fi | |
cd "$1" | |
while [ true ]; do |
View gif_animatedtexture.py
import argparse | |
import os | |
from PIL import Image | |
parser = argparse.ArgumentParser( | |
description='Convert GIF into frames and then create ' | |
'AnimatedTexture .tres') | |
parser.add_argument('gif', help='GIF to process') | |
args = parser.parse_args() |
View netplay.js
const netplay = Array(8).fill().map(() => | |
Math.floor(Math.random() * 16).toString(16) | |
).join(''); | |
console.log(netplay); |
View split.py
#!/usr/bin/env python | |
import fileinput | |
for line in fileinput.input(): | |
print(line.split()) |
View emojifier.go
package main | |
import ( | |
"fmt" | |
"strings" | |
"github.com/cespare/argf" | |
) | |
var alphamoji = map[rune]string{ |
View netplay.py
import string | |
from random import choice | |
print(''.join(choice(string.hexdigits[:-6]) for _ in range(8))) |
View cryptomoji.js
var emoji = require('node-emoji') | |
var emojiList = emoji.search(''); | |
function emojiNum(emoji) { | |
for (var i = 0; i < emojiList.length; i++) { | |
if (emojiList[i].key === emoji) { | |
return i; | |
} | |
} |
View tiltcontrols.py
#!/usr/bin/python | |
import argparse | |
from autopy3 import key | |
parser = argparse.ArgumentParser(description='Type garbage in chat') | |
parser.add_argument('msg', nargs='+', help='message to type') | |
args = parser.parse_args() | |
key.tap(key.K_RETURN) | |
key.type_string(' '.join(args.msg)) |
View cpps.sh
cpps() { | |
exe=/tmp/$(basename $1 .cpp) | |
g++ -std=c++11 -g -O0 $1 -o $exe || return 1 | |
if [ -z "$2" ] | |
then | |
$exe | |
else | |
$exe "${@:2}" |
View HashMap.cpp
#include <iostream> | |
#include <vector> | |
template <class K, class V> | |
class HashMap; | |
template <class K, class V> | |
class Entry { | |
K const key; | |
V value; |