This file contains hidden or 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
| //#define ?? auto | |
| #define cease break | |
| #define upon case | |
| //#define ?? char | |
| #define steadfast const | |
| #define abide continue | |
| //#define ?? default | |
| #define undertake do | |
| //#define ?? double | |
| #define otherwise else |
This file contains hidden or 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 | |
| # Set this to the directory where everything will be moved. | |
| FINAL_DIR=/var/www/mc | |
| # Requirements: | |
| # * pigmap, found here: https://github.com/equalpants/pigmap | |
| # * mcmap, found here: https://github.com/Zahl/mcmap | |
| # * rsync | |
| # * pngcrush |
This file contains hidden or 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
| import random | |
| class Card: | |
| def __init__(self, name, value, suit): | |
| self.name = name | |
| self.value = value | |
| self.suit = suit | |
| def __str__(self): | |
| return '%s%s' % (self.name, self.suit[0]) |
This file contains hidden or 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
| int pins[] = {11,10,9}; | |
| int SPEED = 255; | |
| int buttonA = 3; | |
| int buttonB = 2; | |
| int buttonStateA = LOW; | |
| int buttonStateB = LOW; | |
| int numleds = sizeof(pins)/sizeof(int); | |
| byte ON = 0; |
This file contains hidden or 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 PyQRNative import * | |
| def qrcode(data): | |
| qr = QRCode(4, QRErrorCorrectLevel.L) | |
| qr.addData(data) | |
| qr.make() | |
| return qr.makeImage() |
This file contains hidden or 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 | |
| function smart_crypt($str, $salt, $algo=CRYPT_STD_DES, $rounds=5000, $cost=7) { | |
| switch ($algo) { | |
| case CRYPT_EXT_DES: | |
| $salt = substr($salt, 0, 4); | |
| return crypt($str, '_?..' . $salt); | |
| case CRYPT_MD5: | |
| $salt = substr($salt, 0, 12); | |
| return crypt($str, '$1$' . $salt . '$'); |
This file contains hidden or 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
| import urllib | |
| class Adfly: | |
| def __init__(self, api_key, uid): | |
| self.api_key = api_key | |
| self.uid = uid | |
| self.domain = 'adf.ly' | |
| self.ad_type = 'int' | |
| def get_url(self, url, domain=None, ad_type=None): |
This file contains hidden or 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 bin_read(data): | |
| if type(data) is type([]): | |
| data = ''.join(data) | |
| data = data[::-1] | |
| return data | |
| def bin_write(data, offset, new_data): | |
| left = data[:offset] | |
| right = data[offset+len(new_data):] | |
| data = left + new_data[::-1] + right |
This file contains hidden or 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 | |
| import nbt | |
| def mcseed(filename): | |
| nbtf = nbt.NBTFile(filename, 'rb') | |
| return nbtf[0]['RandomSeed'] | |
| if __name__ == '__main__': | |
| import sys, os.path |
This file contains hidden or 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
| import sys | |
| def set_title(text): | |
| sys.stdout.write('\x1b]2;%s\x07' % text) | |
| if __name__ == '__main__': | |
| set_title(sys.argv[1]) |
OlderNewer