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 python | |
import os, sys | |
sys.path.append(os.getcwd()) | |
import logging | |
import rq | |
MAX_FAILURES = 3 |
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 python | |
from contextlib import closing | |
import urllib2 | |
import json | |
import sys | |
API_KEY = '<insert api key here>' | |
STATUS_EMOJI = { |
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
# Super simple Codeship API wrapper for Python designed to be copy/pasted into | |
# BitBar plugins or other standalone scripts where installing Python packages | |
# from PyPI is impossible or undesirable. | |
# | |
# License: Public Domain | |
from contextlib import closing | |
import urllib2 | |
import json | |
import sys |
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 | |
function clock_emoji { | |
time_hour=$1 | |
time_minute=$2 | |
# Round to 30-minute intervals | |
time_minute=$(( (time_minute + 15) / 30 * 30 )) | |
# If we've rounded up, move to next hour (checking for overflow) |
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
<?xml version="1.0" encoding="UTF-8" ?> | |
<GraphicsConfig> | |
<GUIColour> | |
<Default> | |
<LocalisationName>Standard</LocalisationName> | |
<MatrixRed> 0.57, 0.54, 1 </MatrixRed> | |
<MatrixGreen> 0, 1, 0 </MatrixGreen> | |
<MatrixBlue> 1, 0.52, 1 </MatrixBlue> | |
</Default> | |
</GUIColour> |
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
class redis { | |
apt::ppa {'ppa:rwky/redis': | |
} | |
package {'redis-server': | |
ensure => latest, | |
require => Apt::Ppa['ppa:rwky/redis'], | |
} |
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
import datetime | |
class Base(object): | |
pass | |
class Foo(Base): | |
name = None | |
_modified = None | |
@property |
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
Manix84: 232, 54, 194 | |
samriley: 274, 64, 276 | |
MatthewvanBuuren: -81, 70, 72 | |
nefarioustim: -28, 97, 886 | |
spjwebster: 480, 64, 858 |
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 http://www.marco.org/2012/12/21/ios-dynamic-font-loading | |
NSData *inData = /* your decrypted font-file data */; | |
CFErrorRef error; | |
CGDataProviderRef provider = CGDataProviderCreateWithCFData((CFDataRef)inData); | |
CGFontRef font = CGFontCreateWithDataProvider(provider); | |
if (! CTFontManagerRegisterGraphicsFont(font, &error)) { | |
CFStringRef errorDescription = CFErrorCopyDescription(error) | |
NSLog(@"Failed to load font: %@", errorDescription); | |
CFRelease(errorDescription); | |
} |
NewerOlder