Skip to content

Instantly share code, notes, and snippets.

[Display]
Bilinear=0
Filter=none
FilterPlugin=
IFB=none
KeepOnTop=0
MaxThreads=1
RenderMethod=simple
Scale=2
Stretch=1
import random;
class Card():
def __init__(self, rank, suit):
self.rank = rank;
self.suit = suit;
def __str__(self):
return self.rank + self.suit;
import random;
CORPUS_FILENAME = "/home/theblackparrot/corpus.txt";
corpus = {};
def addToCorpus(line):
words = line.split();
if len(words) < 2:
return;
export INFINALITY_FT_AUTOHINT_HORIZONTAL_STEM_DARKEN_STRENGTH="10"
export INFINALITY_FT_BOLD_EMBOLDEN_X_VALUE="0"
export INFINALITY_FT_AUTOHINT_VERTICAL_STEM_DARKEN_STRENGTH="10"
export INFINALITY_FT_CONTRAST="20"
export INFINALITY_FT_GRAYSCALE_FILTER_STRENGTH="0"
export INFINALITY_FT_FRINGE_FILTER_STRENGTH="15"
export INFINALITY_FT_BRIGHTNESS="20"
export INFINALITY_FT_USE_VARIOUS_TWEAKS="true"
export INFINALITY_FT_GAMMA_CORRECTION="10 80"
export INFINALITY_FT_FILTER_PARAMS="11 22 38 22 11"
#!/bin/sh
IMG_DIR="/srv/http/getaphrase-tweeter/image-queue/"
LOG_FILE="/tmp/getaphrase_log.log"
CHOSEN_IMG=$(find "$IMG_DIR" -type f | shuf -n 1)
if [[ -z "$CHOSEN_IMG" ]]; then
echo "[$(date)] No images to tweet" >> "$LOG_FILE"
else
<?php
$notes = explode(" ", "NC NCS ND NDS NE NF NFS NG NGS NA NAS NB");
$inst = "SteelDrum";
$start_octave = 2;
$preview = 1;
$location = "/tmp";
@TheBlackParrot
TheBlackParrot / qemu-wrapper.sh
Created August 28, 2015 03:25
X session wrapper I use for QEMU
#!/bin/sh
if [ "$EUID" -ne 0 ]
then echo "Please run as root"
exit
fi
conky -c /home/theblackparrot/.conkyrc &
fix-conky &
compton &
@TheBlackParrot
TheBlackParrot / gist:f49bb2714ec8bbd23e4c
Created February 15, 2015 08:11
Blockland - get the topmost brick of a stack
function fxDTSBrick::getTopBrick(%this) {
%upbrick = %this;
while(isObject(%upbrick.getUpBrick(0))) {
%upbrick = %upbrick.getUpBrick(0);
}
return %upbrick;
}