Skip to content

Instantly share code, notes, and snippets.

dorkfish Tue Jun 15 01:42 PM -> ruby door.rb
Openned door
9
8
7
6
5
4
3
2
#!/usr/bin/ruby
require 'rubygems'
require 'pretty-fsm'
require File.join("/", "home", "dorkfish", ".gem", "ruby", "1.9.1", "gems", "chingu-0.7.6.1", "lib", "chingu")
include Gosu
include Chingu
class GameWindow < Chingu::Window
def initialize
@nerdshark
nerdshark / scalablegs-css-tiled-bg.css
Created January 24, 2012 05:59 — forked from kedano/scalablegs-css-tiled-bg.css
Blueprint style tiled background with only CSS (scalable.gs)
html{
background: repeat center;
background-color: #50555f;
/*WEBKIT*/
background-image:
/*VERTICAL LINES*/
-webkit-gradient(linear, left top, left bottom,
color-stop(0, rgba(255,255,255,.4)), color-stop(0.01, rgba(80,85,95,0)), color-stop(0.2, rgba(80,85,95,0)),
color-stop(0.2, rgba(255,255,255,.1)), color-stop(0.21, rgba(80,85,95,0)), color-stop(0.4, rgba(80,85,95,0)),
color-stop(0.4, rgba(255,255,255,.1)), color-stop(0.41, rgba(80,85,95,0)), color-stop(0.6, rgba(80,85,95,0)),
function Enter-HerokuSession
{
if ($env:HerokuPath -ne $null)
{
if (Test-Path $env:HerokuPath)
{
$heroku_binpath = "$env:HerokuPath\bin"
$heroku_ruby_binpath = "$env:herokupath\ruby-1.9.3\bin"
if (Test-Path $heroku_ruby_binpath)
@nerdshark
nerdshark / prezto-config
Last active August 29, 2015 14:05
prezto-config
#/usr/bin/env zsh
for rcfile in "${ZDOTDIR:-$HOME}"/.zprezto/runcoms/^README.md(.N); do
ln -s "$rcfile" "${ZDOTDIR:-$HOME}/.${rcfile:t}"
done
@nerdshark
nerdshark / troublesome_settings.vssettings
Created September 29, 2014 04:03
troublesome vssettings file
<?xml version="1.0" encoding="UTF-8"?>
<UserSettings>
<ApplicationIdentity version="14.0" />
<ToolsOptions>
<ToolsOptionsCategory name="Environment" RegisteredName="Environment" />
</ToolsOptions>
<Category name="Environment_Group" RegisteredName="Environment_Group">
<Category name="Environment_FontsAndColors" Category="{1EDA5DD4-927A-43a7-810E-7FD247D0DA1D}" Package="{DA9FB551-C724-11d0-AE1F-00A0C90FFFC3}" RegisteredName="Environment_FontsAndColors" PackageName="Visual Studio Environment Package">
<PropertyValue name="Version">2</PropertyValue>
<FontsAndColors Version="2.0">
@nerdshark
nerdshark / gist:b7d8455d8268f396953e
Created March 22, 2015 04:15
leibniz summation pi estimator
void Main()
{
double pi = Enumerable.Range(0, 100000000).Aggregate(0d, (accumulated, iter) => {return accumulated + term(iter);});
(pi * 4).Dump();
}
double term(double n)
{
return numerator(n)/denominator(n);
}
@nerdshark
nerdshark / Get-DuplicateFiles.ps1
Created August 27, 2015 00:20
Powershell duplicate file search
function Get-DuplicateFiles
{
param
(
[Parameter(Mandatory=$true)]
[string] $Directory
)
$Duplicates = @{}
@nerdshark
nerdshark / search.cs
Last active October 9, 2015 22:46
Twitter search example
using System;
using System.Collections.Generic;
using System.Linq;
using Tweetinvi;
using Tweetinvi.Core.Enum;
using Tweetinvi.Core.Extensions;
using Tweetinvi.Core.Interfaces;
using Tweetinvi.Core.Parameters;
using System.Text;
@nerdshark
nerdshark / gist:fecc1cf87cb0fd111aa93dbb9e003f89
Created November 12, 2016 16:33
falafel recipe modifications
nerdshark's modifications to the falafel recipe at https://toriavey.com/toris-kitchen/2011/01/falafel/
no parsley
instead of ground coriander, substitute one fistful of chopped cilantro, probably about 1/3 cup, or more if you really like cilantro. alternatively, for convenience, you might be able to use cilantro chutney or adobo cilantro (culantro) cooking base. just mind the moisture of the 'dough'
instead of flour, try to squeeze some moisture out of the soaked and ground chickpeas, the onions, and the cilantro. this will help the 'dough' stay together better without altering the flavor
2tsp or more of black pepper