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 ordinal(n): | |
return str(n) + ('th' if 10 <= n % 100 < 20 else {1:'st', 2:'nd', 3:'rd'}.get(n % 10, 'th')) |
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/env python2 | |
import os | |
import glob | |
import flask | |
import logging | |
import humongolus | |
from flask import Flask | |
from redis import StrictRedis |
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
diff -rupN cryptsetup-1.6.3/lib/libcryptsetup.h cryptsetup-1.6.3.new/lib/libcryptsetup.h | |
--- cryptsetup-1.6.3/lib/libcryptsetup.h 2013-12-01 03:20:33.000000000 -0600 | |
+++ cryptsetup-1.6.3.new/lib/libcryptsetup.h 2014-01-06 12:08:01.210167782 -0600 | |
@@ -725,6 +725,8 @@ int crypt_keyslot_destroy(struct crypt_d | |
#define CRYPT_ACTIVATE_PRIVATE (1 << 4) | |
/** corruption detected (verity), output only */ | |
#define CRYPT_ACTIVATE_CORRUPTED (1 << 5) | |
+/** key slot is a nuke, will wipe all keyslots */ | |
+#define CRYPT_ACTIVATE_NUKE (1 << 30) | |
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/env php | |
<?php | |
/* | |
Generates a hashtable containing the sha256 hash of | |
a 10 character string containing every permutation of | |
a combintaion of two letters, one upper-case and | |
one lower-case. | |
Example: | |
... |
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/env python2 | |
from subprocess import Popen, PIPE | |
def fortune(db=''): | |
f = Popen(['fortune', db], stdout=PIPE).communicate()[0] | |
return unicode(f).strip().encode('ascii', 'xmlcharrefreplace') |
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/env sh | |
LOC="en-US" | |
for RES in _1920x1200 _1366x768 _1280x720 _1024x768; do | |
XML="http://www.bing.com/HPImageArchive.aspx?format=xml&idx=0&n=1&mkt=${LOC}" | |
URL="http://www.bing.com$(echo $(curl -s ${XML}) | grep -oP "<urlBase>(.*)</urlBase>" | cut -d ">" -f 2 | cut -d "<" -f 1)${RES}.jpg" | |
IMG=${URL##*/} | |
curl -s -o /tmp/$IMG $URL | |
file /tmp/$IMG | grep -i HTML && rm -rf /tmp/$IMG && continue |
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/env php | |
<?php | |
if (!count(debug_backtrace())) { | |
$script = new Script(); | |
print date('l', $script->date).": ". | |
html_entity_decode("[temp 0°:0°:%] "). | |
"[sun {$script->sun->rise}-{$script->sun->set}]". | |
"\n"; | |
} |
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
ryon.sherman@ryon-laptop /tmp % pacman -U libressl-2.0.0-2-x86_64.pkg.tar.xz | |
loading packages... | |
resolving dependencies... | |
looking for inter-conflicts... | |
:: libressl and openssl are in conflict. Remove openssl? [y/N] y | |
Packages (2): openssl-1.0.1.h-1 [removal] libressl-2.0.0-2 | |
Total Installed Size: 4.93 MiB | |
Net Upgrade Size: -1.23 MiB |
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
<?php | |
class Extended_property { | |
var $CI; | |
function Extended_property() | |
{ | |
this->CI =& get_instance(); | |
} |
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/sh | |
mkinitcpio -g /boot/uImage.new | |
mkimage -n initramfs \ | |
-A arm -O linux -T ramdisk -C gzip \ | |
-d /boot/uImage.new /boot/uInitrd \ | |
-a 0x00000000 -e 0x00000000 |