Skip to content

Instantly share code, notes, and snippets.

class Rack::ProcTitle
F = ::File
PROGNAME = F.basename($0)
def initialize(app)
@app = app
@appname = Dir.pwd.split('/').reverse.
find { |name| name !~ /^(\d+|current|releases)$/ } || PROGNAME
@requests = 0
$0 = "#{PROGNAME} [#{@appname}] init ..."
@automatthew
automatthew / instant.rake
Created November 10, 2009 20:13
compile and run trivial Java with Rake
# instant.rake
# Rake rules for compiling and running trivial Java programs
#
# Usage: rake com.example.MonkeyShines
# Source goes under ./src
# Classes end up under ./target
require 'rake/clean'
libs = FileList["lib/*"]
import hudson.Launcher;
import hudson.Extension;
import hudson.util.FormValidation;
import hudson.model.AbstractBuild;
import hudson.model.BuildListener;
import hudson.model.AbstractProject;
import hudson.tasks.Builder;
import hudson.tasks.BuildStepDescriptor;
import net.sf.json.JSONObject;
import org.kohsuke.stapler.DataBoundConstructor;
#! /usr/bin/env ruby
status = DATA.flock(File::LOCK_EX | File::LOCK_NB)
if status == 0
puts "we have the lock..."
sleep
else
@cowboyd
cowboyd / JenknsCI JRuby Meeting Details.mdown
Created March 28, 2011 14:28
Meeting Details for Jenkins + JRuby

JenkinsCI Ruby Plugins

Date: Every Thursday, from Thursday, January 5, 2012 to no end date Time: 10:00 am, Central Standard Time (Chicago, GMT-06:00) Meeting Number: 336 439 792 Meeting Password: (This meeting does not require a password.)

@cowboyd
cowboyd / gist:1045642
Created June 24, 2011 20:41
Restart racoon on OSX
sudo launchctl unload /System/Library/LaunchDaemons/com.apple.racoon.plist
sudo launchctl load /System/Library/LaunchDaemons/com.apple.racoon.plist
@thommahoney
thommahoney / gist:2491946
Created April 25, 2012 18:27
RailsConf 2012 Lightning Talks
5 min:
~ Objective-C + Rails: Communicating with Rails from iOS / Mac OS
Dan Hassin
1 min:
~ Painless Javascript
koting hatduklgg
with wind tunnel
5 min:
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active April 19, 2024 11:00
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@machty
machty / gist:68afad4c03109f36d4f4cffaae3c170b
Last active February 7, 2017 17:45
embercommunity.slack.com #topic-forms discussion
joined #topic-forms, and invited @machty
locks [11:05 AM]
thar you go
machty [11:06 AM]
thank you!
[11:07]
@samselikoff @cowboyd
@yelouafi
yelouafi / multishot-callcc.js
Created September 21, 2018 17:05
multi shot continuations
function isGenerator(x) {
return x != null && typeof x.next === "function"
}
function isFrame(x) {
return x != null && x._type_ === 'call_frame'
}
function call(genFunc, ...args) {