Skip to content

Instantly share code, notes, and snippets.

View quine.rb
"Quine of Life by Andrew Vos (";game=[
" ",
" ",
" ",
" ",
" ",
" ",
" X X X ",
" X X ",
" X X ",
AndrewVos / group-policy.reg
Created Oct 25, 2010
Kills off irritating group policy settings your domain may impose on you.
View group-policy.reg
Windows Registry Editor Version 5.00
; Sets the wallpaper to the default
; Allows you to change wallpaper style (center, stretch etc.)
; Allows you to change the visual style
; Disables that profile quota message
AndrewVos / modify_build_output.rb
Created Dec 20, 2010
Find all "class library" .csproj files and change their build output folder. This should speed up builds on solutions with a large amount of projects.
View modify_build_output.rb
require 'nokogiri'
require 'pathname'
BUILD_OUTPUT = File.join(File.dirname(__FILE__), "build_output")
Dir["**/*.csproj"].each do |project|
xml = Nokogiri::XML(
project_type_node = xml.xpath("//xmlns:PropertyGroup/xmlns:OutputType[1]", xml.root.namespaces).first
View gist:799192
~ $ gem install ncurses
Building native extensions. This could take a while...
ERROR: Error installing ncurses:
ERROR: Failed to build gem native extension.
/Users/andrewvos/.rvm/rubies/ruby-1.9.2-p0/bin/ruby extconf.rb
checking for unistd.h... yes
checking for ncurses.h... yes
checking for wmove() in -lncurses... yes
checking for newscr()... yes
View gist:803044
class TimeHelper
class << self
def time_difference(time_start, time_end)
total_seconds = Integer(time_end - time_start)
seconds = (total_seconds % 60)
minutes = (total_seconds - seconds) / 60
hours = (minutes - (minutes % 60)) / 60
minutes = minutes - hours * 60
result = []
AndrewVos / gist:818535
Created Feb 9, 2011
View gist:818535
using System;
using System.Collections.Generic;
using System.Linq;
namespace TheMayneExtensions
public static class TheMayneExtensions
public static bool IfThereAreAny<T> (this IEnumerable<T> enumerable)
View rubygems-rake-test-output.txt
c:/Ruby192/bin/ruby.exe -w -Ilib;bin;test;. --disable-gems -e 'require "rubygems
"; require "test/unit"; require "test/rubygems/test_config.rb"; require "test/ru
bygems/test_gem.rb"; require "test/rubygems/test_gem_builder.rb"; require "test/
rubygems/test_gem_command.rb"; require "test/rubygems/test_gem_commands_build_co
mmand.rb"; require "test/rubygems/test_gem_commands_cert_command.rb"; require "t
est/rubygems/test_gem_commands_check_command.rb"; require "test/rubygems/test_ge
m_commands_contents_command.rb"; require "test/rubygems/test_gem_commands_depend
ency_command.rb"; require "test/rubygems/test_gem_commands_environment_command.r
b"; require "test/rubygems/test_gem_commands_fetch_command.rb"; require "test/ru
bygems/test_gem_commands_generate_index_command.rb"; require "test/rubygems/test
You can’t perform that action at this time.