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/ruby1.8 | |
# Script to watch a directory for any changes to a haml file | |
# and compile it. | |
# | |
# USAGE: ruby haml_watch.rb <directory_to_watch> | |
# | |
# Original by Blake Smith / http://blakesmith.github.com/2010/09/05/haml-directory-watcher.html | |
# Modifications by fin / http://fin.io | |
# |
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
diff --git a/src/event/ngx_event_connect.h b/src/event/ngx_event_connect.h | |
index d64f1bb..f067830 100644 | |
--- a/src/event/ngx_event_connect.h | |
+++ b/src/event/ngx_event_connect.h | |
@@ -24,6 +24,7 @@ typedef ngx_int_t (*ngx_event_get_peer_pt)(ngx_peer_connection_t *pc, | |
void *data); | |
typedef void (*ngx_event_free_peer_pt)(ngx_peer_connection_t *pc, void *data, | |
ngx_uint_t state); | |
+typedef void (*ngx_event_preconnect_pt)(void *pc, void *data);/* actually: ngx_http_request_t *r, ngx_http_upstream_t *u */ | |
#if (NGX_SSL) |
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
diff --git a/src/event/ngx_event_connect.h b/src/event/ngx_event_connect.h | |
index d64f1bb..f067830 100644 | |
--- a/src/event/ngx_event_connect.h | |
+++ b/src/event/ngx_event_connect.h | |
@@ -24,6 +24,7 @@ typedef ngx_int_t (*ngx_event_get_peer_pt)(ngx_peer_connection_t *pc, | |
void *data); | |
typedef void (*ngx_event_free_peer_pt)(ngx_peer_connection_t *pc, void *data, | |
ngx_uint_t state); | |
+typedef void (*ngx_event_preconnect_pt)(void *pc, void *data);/* actually: ngx_http_request_t *r, ngx_http_upstream_t *u */ | |
#if (NGX_SSL) |
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 requests # pip install requests | |
import json | |
USER_1 = 'U1' | |
USER_2 = 'U2' | |
def get_user_followers(u): | |
x = json.loads(requests.get('http://api.twitter.com/1/followers/ids.json', params={'screen_name': u}).content) | |
return set(x) |
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
grep -m 1 * | grep -v ']}' | |
require 'rubygems' | |
require 'twitter' | |
require 'json' | |
username = "fin" | |
last_id = nil | |
page = 1 | |
numberoftweets = 0 | |
savedtweets = 0 |