Skip to content
View __init__.py
# Set session handler
app.session_interface = RedisSessionInterface()
View classical.js
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
class supervisor {
package {'python-pip-supervisor':
ensure => latest,
name => 'supervisor',
provider => 'pip',
}
File {
owner => root,
View redis-manifests-init.pp
class redis {
apt::ppa {'ppa:rwky/redis':
}
package {'redis-server':
ensure => latest,
require => Apt::Ppa['ppa:rwky/redis'],
}
View rqretryworker.py
#!/usr/bin/env python
import os, sys
sys.path.append(os.getcwd())
import logging
import rq
MAX_FAILURES = 3
View settertest.py
import datetime
class Base(object):
pass
class Foo(Base):
name = None
_modified = None
@property
View gist:5432925
Manix84: 232, 54, 194
samriley: 274, 64, 276
MatthewvanBuuren: -81, 70, 72
nefarioustim: -28, 97, 886
spjwebster: 480, 64, 858
View gist:4354116
// 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
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;
Something went wrong with that request. Please try again.