foreverasdasdasd
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 random | |
start = 0.05 | |
end = 0.2 | |
interval = 11 | |
intervals = [0.0] * interval | |
step = (end - start) / (interval * 2) # adjust to taste, coarser might feel more "random" | |
# only continue while the gap between start and end isn't closed |
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
# install git | |
sudo apt-get install g++ curl libssl-dev apache2-utils | |
sudo apt-get install git-core | |
sudo apt-get install nodejs | |
# install the Node package manager for later use | |
curl http://npmjs.org/install.sh | sudo sh | |
sudo npm install express | |
# clone the statsd project | |
git clone https://github.com/etsy/statsd.git | |
# download everything for graphite |
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 AnnotateManager(models.Manager): | |
def get_query_set(self): | |
return super(AnnotateManager, self).get_query_set()\ | |
.extra(select={'has_prefill': 'ISNULL(prefill)'})\ | |
.order_by('-has_prefill', '-required', 'id') |
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
"limits": { | |
"zap_limit": -1, | |
"action_limit": -1, | |
"actions_this_period": 4, | |
"app_blacklist_list": [], | |
"allotment": [ | |
{ | |
"count": 1, | |
"percent": 0, | |
"limit": "unlimited", |
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
traceroute: Warning: d2glos6gx2bw40.cloudfront.net has multiple addresses; using 205.251.215.209 | |
traceroute to d2glos6gx2bw40.cloudfront.net (205.251.215.209), 64 hops max, 52 byte packets | |
1 unknown (192.168.1.1) 0.481 ms 0.399 ms 0.348 ms | |
2 71.204.164.1 (71.204.164.1) 96.459 ms 29.902 ms 19.931 ms | |
3 te-0-1-0-4-ur05.santaclara.ca.sfba.comcast.net (68.86.248.17) 10.354 ms 8.242 ms 9.542 ms | |
4 te-1-1-0-3-ar01.sfsutro.ca.sfba.comcast.net (68.85.155.62) 22.286 ms | |
te-1-1-0-2-ar01.sfsutro.ca.sfba.comcast.net (68.85.155.58) 9.923 ms | |
te-1-1-0-1-ar01.sfsutro.ca.sfba.comcast.net (69.139.198.90) 22.058 ms | |
5 he-1-6-0-0-cr01.sanjose.ca.ibone.comcast.net (68.86.90.157) 15.108 ms 18.198 ms 12.607 ms | |
6 xe-11-0-0.edge1.sanjose1.level3.net (4.79.43.137) 26.000 ms 26.451 ms 27.229 ms |
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
results = JSON.parse(bundle.response.content); | |
// assuming results is an array of objects, object being the full json you pasted | |
out = _.map(results, function(result){ | |
// handle properties, ignoring versions | |
result.properties = _.object(_.map(result.properties, function(valueSet, key){ | |
return [key, valueSet.value]; | |
})); | |
// similar code to handle examples of {key: Array()}, maybe using _.first? | |
return result; |
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
{ | |
"name": "My Fancy Zap Title", | |
"link": "https://zapier.com/app/edit/12345", | |
"trigger": { | |
"service": { | |
"name": "Service Name (like Github)", | |
"logos": { | |
"16x16": "https://cdn.zapier.com/path/to/image.16x16.png", | |
"32x32": "https://cdn.zapier.com/path/to/image.32x32.png", | |
"64x64": "https://cdn.zapier.com/path/to/image.64x64.png" |
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 django.conf import settings | |
from django.core.handlers.base import BaseHandler | |
from django.core import urlresolvers | |
SILENT_EARLY_RETURN_FAIL = getattr(settings, 'SILENT_EARLY_RETURN_FAIL', True) | |
def return_early_decorator(view): | |
""" | |
In a view, return early, like so: |
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/perl | |
# Written by Dormando. | |
# PUBLIC DOMAIN. | |
# No guarantees it won't eat your cat. | |
use warnings; | |
use strict; | |
use IO::Socket::INET; | |
use Time::HiRes qw/time sleep/; |