Steve Webster spjwebster

View classical.js
1 2 3 4 5 6 7 8 9 10
function augment(parent, properties) {
var child = properties.constructor || function() {
return parent.apply(this, arguments);
};
var Surrogate = function(){ this.constructor = child; };
Surrogate.prototype = parent.prototype;
child.prototype = new Surrogate;
for (var key in properties) {
View supervisor-manifests-init.pp
1 2 3 4 5 6 7 8 9 10
class supervisor {
 
package {'python-pip-supervisor':
ensure => latest,
name => 'supervisor',
provider => 'pip',
}
 
File {
owner => root,
View redis-manifests-init.pp
1 2 3 4 5 6 7 8 9
class redis {
 
apt::ppa {'ppa:rwky/redis':
}
 
package {'redis-server':
ensure => latest,
require => Apt::Ppa['ppa:rwky/redis'],
}
View rqretryworker.py
1 2 3 4 5 6 7 8 9
#!/usr/bin/env python
 
import os, sys
sys.path.append(os.getcwd())
 
import logging
import rq
 
MAX_FAILURES = 3
View settertest.py
1 2 3 4 5 6 7 8 9 10
import datetime
 
class Base(object):
pass
 
class Foo(Base):
name = None
_modified = None
 
@property
View gist:5432925
1 2 3 4 5
Manix84: 232, 54, 194
samriley: 274, 64, 276
MatthewvanBuuren: -81, 70, 72
nefarioustim: -28, 97, 886
spjwebster: 480, 64, 858
View gist:4354116
1 2 3 4 5 6 7 8 9 10
// 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);
}
View 001_query.sql
1 2 3 4 5 6
SELECT url, COUNT(DISTINCT pageid) AS count
FROM requests
WHERE url LIKE 'https://code.jquery.com/jquery-%'
OR url LIKE 'http://code.jquery.com/jquery-%'
GROUP BY url
ORDER BY count DESC;
View 001_query.sql
1 2 3 4 5 6
SELECT url, COUNT(DISTINCT pageid) AS count
FROM requests
WHERE url LIKE 'https://ajax.aspnetcdn.com/ajax/jQuery/%'
OR url LIKE 'http://ajax.aspnetcdn.com/ajax/jQuery/%'
GROUP BY url
ORDER BY count DESC;
Something went wrong with that request. Please try again.