Skip to content

Instantly share code, notes, and snippets.

@webcoyote
webcoyote / WalkDir.rb
Created September 13, 2011 22:21
Log file iterator pattern
require 'pathname'
require 'date'
class WalkDir
def initialize (opts = {})
# Set default handlers
@file_pattern = opts[:file_pattern] || /^[^.]/ # no hidden files
@dir_pattern = opts[:dir_pattern] || /^[^.]/ # no hidden directories
@result = opts[:result] || lambda { |pathname, match| return pathname, match }
using UnityEngine;
using System;
using System.Threading;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Text;
public class Main : MonoBehaviour {
private class TimeFunc {
public TimeFunc (string name, Func<float> time, bool applyDelta = true) {
@webcoyote
webcoyote / .kitchen.yml
Created September 10, 2014 23:12
Test kitchen configuration initialized by discovering the values from Chef-server
# test-kitchen YAML configuration file which discovers values from Chef environment
#
# Manual configuration got you down?
# Don't want to pollute your shell environment with a bunch of secrets?
# Why not load those values from Chef?!?
#
<%
require 'yaml'
#!/bin/bash
echo testing "$@"
@webcoyote
webcoyote / rollbar.rb
Created July 7, 2014 22:40
Rollbar provisioning - create teams and projects for Rollbar.com
#!/usr/bin/env ruby
# by Patrick Wyatt
require 'json'
require 'net/http'
require 'openssl'
require 'uri'
class Rollbar
def initialize (read_token, write_token)