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
require "nokogiri" | |
require "json" | |
require 'gdbm' | |
class LiPosFromGcideExtractor | |
def parse_each_file(filename) | |
File.open(filename, "r:ISO-8859-1") do |file| | |
chunks = file.read | |
.split(/\n\n/) | |
.select{|chunk| chunk =~ /^[<\[]\w/} |
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
# Hoptoad integration example. | |
task "deploy:before" => "isolate:dotgems" do | |
if /\.gems/ =~ `git status` | |
abort "Changed gems. Commit '.gems' and deploy again." | |
end | |
ENV["TO"] = Deploy.env | |
end |
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
" Vim syntax file | |
" Language: Soy Templates | |
" Maintainer: Rodrigo Machado rcmachado@gmail.com | |
" Last Change: Thu Apr 15 16:59:00 GMT 2010 | |
" Filenames: *.soy | |
" URL: http://gist.github.com/gists/367358/download | |
" | |
" Based on Smarty.vim | |
" For version 5.x: Clear all syntax items |
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/bash | |
# originally from http://stackoverflow.com/questions/3143575/list-the-files-i-own-in-subversion/3144017 | |
set -e | |
for file in `svn ls -R`; do | |
if [ -f $file ]; then | |
owner=`svn blame $file | tr -s " " " " | cut -d" " -f3 | sort | uniq -c | sort -nr | head -1 | tr -s " " " " | cut -d" " -f3` | |
if [ $owner ]; then | |
echo $file $owner |
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
--- SHDH statistics --- | |
42 parties transmitted, 41 parties received, 0.2% party loss | |
party min/avg/max/stddev = 21/47.976/105/17.097 days |
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
<?php | |
/** | |
* Compares all running instances to all reserved instances and reports | |
* utilization. Useful for making sure you're not wasting money. :P | |
* | |
* Requires EC2_CERT and EC2_PRIVATE_KEY environment variables to be set. | |
* | |
* @author Dave | |
* @date 2010-10-05 | |
*/ |
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/ruby | |
# Version (0.78) | |
# Created by Artem Titoulenko (artem.titoulenko@gmail.com) | |
# clock in application. I'm tired of counting. | |
# C.rb -- Time keeping script. | |
# Call with no params to clock in/out | |
# Params: | |
# ? : are you clocked in? check | |
# log : peek at the work log |
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
# references.rb has moved to https://github.com/olov/jekyll-references |
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
// This is a demo of how tail recursion could be implemented, logically | |
// speaking. | |
// | |
// Most C compilers will actually optimize the following code into true | |
// tail-recursive code (try it at http://llvm.org/demo/ ): | |
// | |
// long factorial(long n) { | |
// if (n == 0) return 1; | |
// return n * factorial(n - 1); | |
// } |
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
input { | |
file { | |
type => nginx_web | |
path => ["/var/log/nginx/*"] | |
exclude => ["*.gz"] | |
} | |
} | |
filter { | |
grok { |
OlderNewer