This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// create a toggler link...is there a better way? | |
var toggler = new Ext.BoxComponent({ | |
autoEl: { | |
tag: 'a', | |
href: '#', | |
html: 'All' | |
}, | |
listeners: { | |
'render': function(comp) { | |
var el = comp.getEl(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; js-beautify.el -- beautify some js code | |
(defgroup js-beautify nil | |
"Use jsbeautify to beautify some js" | |
:group 'editing) | |
(defcustom js-beautify-args "--jslint-happy --brace-style=end-expand --keep-array-indentation" | |
"Arguments to pass to jsbeautify script" | |
:type '(string) | |
:group 'js-beautify) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
# git-bz -- given a version and target, print out a merge | |
# email for sending to bz | |
use warnings; | |
use strict; | |
use Carp; | |
use Git; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;;========================================================================== | |
;;; DATE MADNESS | |
;;;========================================================================== | |
;;; from ejacs...a whole other type of madness | |
(defun js-date-js-to-elisp (time) | |
"Turn a JavaScript ms TIME value into (high low . ignored) | |
`high' is the most signifcant 16 bits; `low' is the 16 lsb." | |
(let ((sec (/ time 1000.0))) | |
(list (truncate (/ sec 65536)) ; high 16 bits of sec |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> perl -e 'warn ${"::x'\'')"}' | |
2034 2034 203 103 100 at -e line 1. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Binary search solves the problem [of searching within a pre-sorted array] by | |
# keeping track of a range within the array in which T [i.e. the sought value] | |
# must be if it is anywhere in the array. Initially, the range is the entire | |
# array. The range is shrunk by comparing its middle element to T and | |
# discarding half the range. The process continues until T is discovered in the | |
# array, or until the range in which it must lie is known to be empty. In an | |
# N-element table, the search uses roughly log(2) N comparisons. | |
def bin_search(A, T): | |
""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/gl-compile-conf b/src/gl-compile-conf | |
index c9b953b..71ef61b 100755 | |
--- a/src/gl-compile-conf | |
+++ b/src/gl-compile-conf | |
@@ -362,6 +362,12 @@ for my $fragment_file (glob("conf/fragments/*.conf")) | |
parse_conf_file($fragment_file, $fragment); | |
} | |
+# these 4 lines prevent a segfault on the Data::Dumper line | |
+for my $key ( keys %repos) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$self->assign( | |
'ext_list', | |
[ map { | |
my @l = split /,/; | |
my $count = 0; | |
my $r = [ | |
$l[0], | |
{ map +( int( $count++ % 2 ) == 0 ? lc $_ : $_ ), | |
@l[ 1 .. $#l ] | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
st = status | |
ci = commit | |
br = branch | |
co = checkout | |
df = diff | |
lg = log -p | |
lol = log --pretty=oneline --abbrev-commit --graph --decorate | |
unstage = reset HEAD | |
who = shortlog -s -- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# rtm - simply use twitter to send off a direct message to rtm to add a task | |
username=$1 | |
shift | |
password=$2 | |
shift | |
curl -s --basic --user "$username:$password" --data-ascii \ |