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
# http://rubylearning.com/blog/2009/12/27/rpcfn-mazes-5/ | |
# | |
# Not efficient, but fairly readable. | |
# Author: [email protected] | |
class Maze | |
class Node | |
attr_reader :x, :y, :distance | |
attr_accessor :neighbors | |
def initialize(x, y) |
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
--- src/http/ngx_http_variables.c.orig 2010-01-11 03:21:46.000000000 -0800 | |
+++ src/http/ngx_http_variables.c 2010-02-18 10:01:32.000000000 -0800 | |
@@ -93,6 +93,9 @@ | |
static ngx_int_t ngx_http_variable_pid(ngx_http_request_t *r, | |
ngx_http_variable_value_t *v, uintptr_t data); | |
+static ngx_int_t ngx_http_variable_start_time(ngx_http_request_t *r, | |
+ ngx_http_variable_value_t *v, uintptr_t data); | |
+ | |
/* |
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
### SVN commands | |
# Run these in the tag/branch working copy root. | |
# The svn_merge* functions depend on having 'trunk' and '<tag name>' working copies in the same directory. | |
SVN_TRUNK=~/_work/Site/trunk | |
# Print changelog since the last tag was cut | |
function tag_patches() | |
{ | |
if expr `pwd` : '.*/m[0-9][0-9]-[0-9][0-9]-[0-9][0-9]$' > /dev/null; then |
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
// Opens a new tab that loads the Zendesk ticket referred to by the JIRA issue you're looking at. | |
// Specific to New Relic--that DOM ID is for our custom ZendeskID field in JIRA. | |
javascript:a=document.getElementById('customfield_10100-val');t=a.innerHTML;re=new%20RegExp(/([0-9]+)/);n=re.exec(t);if(n!=null){N=n[1];window.open('https://support.newrelic.com/tickets/'+N);}void%200 |
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
Full Plugin List Deployed in Rails applications monitored by New Relic, September 2011 | |
Count Plugin Name | |
------------------- | |
2040 rpm | |
1534 newrelic_rpm | |
1268 acts_as_list | |
1186 paperclip | |
1130 will_paginate | |
1068 exception_notification |
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
load File.dirname(__FILE__) + '/.railsrc' if $0 == 'irb' && ENV['RAILS_ENV'] |
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/env sh | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2324912/hack.sh | sh | |
# | |
echo "Enable full keyboard access for all controls (e.g. enable Tab in modal dialogs)" | |
defaults write NSGlobalDomain AppleKeyboardUIMode -int 3 |
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
#!/bin/sh | |
# Refuse to commit files with the string NOCOMMIT, debugger, or merge markers present. | |
# | |
files=$(git diff-index --name-status --cached HEAD | grep -v ^D | cut -c3-) | |
if [ "$files" != "" ] | |
then | |
for f in $files | |
do |
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
http://steamcommunity.com/dev | |
https://developer.valvesoftware.com/wiki/Steam_Web_API#GetGlobalAchievementPercentagesForApp_.28v0001.29 | |
http://koraktor.de/steam-condenser/ | |
https://github.com/koraktor/steam-condenser-ruby |
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
[rust] whsky:ralph-libuv-tasks rust run server.rs | |
server.rs:19:16: 19:21 error: mismatched types: expected `&mut ~[<V37>]` but found `~[u8]` (expected &-ptr but found vector) | |
server.rs:19 vec::push(bytes, byte as u8); | |
^~~~~ | |
error: aborting due to previous error | |
rust: task failed at 'explicit failure', /Users/ralph/_code/rust-0.6/src/libsyntax/diagnostic.rs:99 | |
rust: task failed at 'explicit failure', /Users/ralph/_code/rust-0.6/src/librustc/rustc.rc:357 | |
rust: domain main @0x7fb88200c210 root task failed |
OlderNewer