Skip to content

Instantly share code, notes, and snippets.

"Quine of Life by Andrew Vos (andrewvos.com)";game=[
" ",
" ",
" ",
" ",
" ",
" ",
" X X X ",
" X X ",
" X X ",
@AndrewVos
AndrewVos / group-policy.reg
Created October 25, 2010 11:47
Kills off irritating group policy settings your domain may impose on you.
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System]
; Sets the wallpaper to the default
"Wallpaper"=-
; Allows you to change wallpaper style (center, stretch etc.)
"WallpaperStyle"=-
; Allows you to change the visual style
"SetVisualStyle"=-
; Disables that profile quota message
@AndrewVos
AndrewVos / modify_build_output.rb
Created December 20, 2010 15:54
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.
require 'nokogiri'
require 'pathname'
BUILD_OUTPUT = File.join(File.dirname(__FILE__), "build_output")
Dir["**/*.csproj"].each do |project|
xml = Nokogiri::XML(File.read(project))
project_type_node = xml.xpath("//xmlns:PropertyGroup/xmlns:OutputType[1]", xml.root.namespaces).first
mkdir /Dropbox/bash
~ $ 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
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 = []
sdsdsd
@AndrewVos
AndrewVos / gist:818535
Created February 9, 2011 14:11
TheMayneExtensions
using System;
using System.Collections.Generic;
using System.Linq;
namespace TheMayneExtensions
{
public static class TheMayneExtensions
{
public static bool IfThereAreAny<T> (this IEnumerable<T> enumerable)
{
map <Leader>t :w\|!rspec spec
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