Skip to content

Instantly share code, notes, and snippets.

[core]
editor = nano
pager = less
whitespace = trailing-space,space-before-tab,indent-with-non-tab
[color]
diff = auto
status = auto
branch = auto
interactive = auto
"\e[B": history-search-forward
"\e[A": history-search-backward
<?php
// Guess the invalid PHP!
class Printer {
function __construct($num) {
$this->num = $num;
}
function printing($num = $this->num)
@bkudria
bkudria / gist:7556
Created August 27, 2008 18:48 — forked from pauldix/gist:7549
require 'benchmark'
require 'rubygems'
require 'json'
require 'yaml'
include Benchmark
benchmark_iterations = 1
large_single_dimension_array = [42, 123.123, :foobar] * 5000
large_single_dimension_hash = {}
10000.times do |i|
module Make (Loc : Sig.Loc) : Sig.Camlp4Token with module Loc = Loc;
%h1 Prospects
- unless @prospects.empty?
%table
%tr
%th Organization
%th Location
%th Url
%th Org url
- for stage, prospects in @prospects_by_stage
@bkudria
bkudria / gist:69927
Created February 25, 2009 01:13
YQL query to get all followers' real names from the TimesPeople API
use 'http://github.com/bkudria/yql-tables/raw/dcf34a2d0be5b75b0a0d44bdb5d308f5f3a1f7f5/nyt/nyt.people.followers.xml' as followers;
select user_displayname from followers where apikey='your:api:key' and user-id='56039348'
HASHSTRING=`hostname`
if [[ $DISTRO = "CentOS" ]]; then
HASHSTRING="`hostname -f`"
fi
HOSTCOLORCODE=$(hosts.rb -d $HASHSTRING)
HOSTCOLORESCAPE=$'%{\e[38;5;%}'$HOSTCOLORCODE$'%{m%}'
class JavaClass {
int magicNumber;
public JavaClass (int inputNumber) {
magicNumber = inputNumber + 1;
}
}
(defun create-tags-file ()
(interactive)
(let*
((project-dir (read-directory-name "Project directory? "))
(project-tags-file (concat project-dir ".tags"))
(project-files (concat project-dir "*"))
(ctags-args '()))
(call-process "ctags-exuberant" nil nil t "-e" "-f" project-tags-file " " project-files))
)