Skip to content

Instantly share code, notes, and snippets.

View darragh's full-sized avatar

Darragh Curran darragh

View GitHub Profile
[ec2-user@ip-10-28-184-169 ~]$ cat /tmp/passenger-standalone.1680/config
#####################################################
#
# !!!!!!! WARNING, READ THIS !!!!!!!
#
#
# The fact that Phusion Passenger uses Nginx
# internally is considered to be an implementation
# detail that the user should not bother with.
# We may arbitrarily replace the Nginx core with
@darragh
darragh / a-curl-gzip-sfo
Created August 3, 2012 11:37
empty-image-file-from-some-cloudfront-edge-locations
$ curl -i -H "Accept-Encoding: gzip,deflate" -v -o /dev/null 'https://dmhx3adjqsy1o.cloudfront.net/assets/marketing/whatwedo0201-cf9b0a547fed9462515d48cfac18135c.jpg'* About to connect() to dmhx3adjqsy1o.cloudfront.net port 443 (#0)
* Trying 205.251.203.120... % Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0connected
* Connected to dmhx3adjqsy1o.cloudfront.net (205.251.203.120) port 443 (#0)
* SSLv3, TLS handshake, Client hello (1):
} [data not shown]
* SSLv3, TLS handshake, Server hello (2):
{ [data not shown]
* SSLv3, TLS handshake, CERT (11):
application: letsgateway
version: 1
runtime: python
api_version: 1
inbound_services:
- mail
handlers:
- url: /emails
jetpack.tabs.onReady(function onNextPage(doc)
{
if (doc.location.href.match(/http:\/\/twitter.com/)) {
$(doc).find('html').css({'overflow': '-moz-scrollbars-vertical'});
$(doc).find('#trends a, #trends_list a').click(function() {
$(doc).find('#home_search_q, #sidebar_search_q').val($(this).attr('name'));
});
$(doc).find('a.search-link').click(function() {
$(doc).find('#sidebar_search_q').val($(this).attr('title'));
});
# As part of blog post "Detect clashing named routed early in rails"
# http://blog.peelmeagrape.net/2009/3/12/detect-clashing-named-routes-early-in-rails
module IGOpeople
module Routing
module BorkOnNamedRouteClash
def self.included(base)
base.alias_method_chain(:add_named_route, :checking_clash) if ['development','test'].include?(RAILS_ENV)
end
def add_named_route_with_checking_clash(name, path, options = {})
@darragh
darragh / feeds.txt
Created December 15, 2008 19:18
list of feed urls for members of ruby ireland
url
http://feeds.feedburner.com/peelmeagrape
http://feeds.feedburner.com/ozonesoft
http://www.davidjrice.co.uk/xml/atom/feedburner.xml
http://feeds.feedburner.com/pabcas
http://paulmwatson.com/journal/feed/atom/
http://ozone.wordpress.com/feed/
http://tonybyrne.blogspot.com/feeds/posts/default
http://fintanp.wordpress.com/feed/
// ==UserScript==
// @name railsconfeurope-autologin
// @namespace http://blog.peelmeagrape.net/railsconfeurope-autologin
// @include https://hotspot.t-mobile.net/wlan/start.do*
// ==/UserScript==
document.getElementsByName('username')[0].value = 'G-oreilly.kv@t-mobile.de'
document.getElementsByName('password')[0].value = 'hotspot'
document.getElementsByName('strAGB')[0].checked = true;
document.forms[0].submit();
// ==UserScript==
// @name railsconfeurope-autologin
// @namespace http://blog.peelmeagrape.net/railsconfeurope-autologin
// @include https://hotspot.t-mobile.net/wlan/start.do*
// ==/UserScript==
document.getElementsByName('username')[0].value = 'G-oreilly.kv@t-mobile.de'
document.getElementsByName('password')[0].value = 'hotspot'
document.getElementsByName('strAGB')[0].checked = true;
document.forms[0].submit();
/*
Use this small script to convert dates to a relative time in words.
uses prototype.. http://www.prototypejs.org/
inspired by rails distance_of_time_in_words helper http://apidock.com/rails/ActionView/Helpers/DateHelper/distance_of_time_in_words
http://blog.peelmeagrape.net/2008/8/30/time-ago-in-words-javascript-part-2
Fell free to use as you wish...
*/
TimeInWordsHelper = {
distanceInWords: function(fromTime, toTime, includeSeconds) {