Skip to content

Instantly share code, notes, and snippets.

View dstrelau's full-sized avatar

Dean Strelau dstrelau

View GitHub Profile
var ConfirmedDeleteButton = Class.create({
initialize:function(anchor) {
this.anchor = anchor;
if (this.anchor.readAttribute('alt').blank()) {
this.confirmationText = 'Are you sure?';
} else {
this.confirmationText = this.anchor.readAttribute('alt');
}
this.anchor.observe('click', this.deleteFormSubmit.bindAsEventListener(this));
diff --git a/git-svn.perl b/git-svn.perl
index 099fd02..7a1d26d 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -421,7 +421,7 @@ sub cmd_dcommit {
$head ||= 'HEAD';
my @refs;
my ($url, $rev, $uuid, $gs) = working_head_info($head, \@refs);
- $url = $_commit_url if defined $_commit_url;
+ $url = defined $_commit_url ? $_commit_url : $gs->full_url;
#!/usr/bin/env ruby
# module: abc
require 'rubygems'
require 'thor'
class Abc < Thor
desc 'debug', ''
def debug
#!/usr/bin/env ruby
# module: abc
require 'rubygems'
require 'thor'
class Abc < Thor
desc 'debug', ''
def debug
Tildeslash End User License Agreement
This end user license agreement ("Agreement") is made between
Tildeslash Ltd, a company registered in Norway with the
organization number 991506020 ("Tildeslash") and the end user
("You").
This license applies to the M/Monit Software ("the Software") and
any other machine-readable materials including, but not limited
alias ip-address="ifconfig eth0 | egrep 'inet[^6]' | awk '{print \$2}' | cut -c6-"
alias apt-install='sudo apt-get install'
alias apt-remove='sudo apt-get remove'
From 1cff7685f5a2013d3e3b13a7407ea64e21aae4de Mon Sep 17 00:00:00 2001
From: dean <dean@26634371-c258-0410-a0b0-f38a24f56ed3>
Date: Fri, 31 Oct 2008 21:50:16 +0000
Subject: [PATCH] Swizzle recipes organization
git-svn-id: svn+ssh://development.mintdigital.com/mint/svn/briarpatch/branches/caplets@73 26634371-c258-0410-a0b0-f38a24f56ed3
---
lib/caplets/plugins/apt.rb | 18 +++++++++++
lib/caplets/plugins/aptitude.rb | 18 -----------
lib/recipes/deploy.rb | 23 ++++++++++++++
# module: source
class Source < Thor
class Clean < Thor
desc "whitespace", "Clean trailing whitespace."
method_options :extension => :optional
def whitespace
Dir.glob("./**/*#{options[:extension]}").each do |file|
next unless File.file?(file)
convert -crop 509x1+0+0 top-row.png txt:- | grep -v 'black$' | ruby -e 'STDIN.each {|line| print $1.to_i.chr if line =~ /0,\s?(\d{2,3})\)/}'
#!/usr/bin/env ruby
require 'rubygems'
require 'thor'
class Dscl < Thor
map "-l" => :list, "-a" => :create, "-d" => :delete
desc "list", "list known hosts"
def list
raw = `sudo dscl localhost -readall /Local/Default/Hosts`.split('-')