Skip to content

Instantly share code, notes, and snippets.

View metafeather's full-sized avatar

Liam Clancy metafeather

View GitHub Profile
I found Tim Fanelli's Blog ( http://www.timfanelli.com/cgi-bin/pyblosxom.cgi/j2ee/ ) entry quite helpful
1. In xcode, create a new empty project with the same dir any sources were checked out from.
2. Name the project with the same name used as the SVN module. NOTE: the .xcodeproj file should end up in the same directory as your build.xml file.
3. From the finder, dragged the src/ directory into the top level project name item in the project window.
4. Removed any unwanted items from the folder hierarchy now in xcode. For example, remove all generated build .jar files.
# From Entropy.ch:
# Here’s a little terminal command I use to repeatedly attempt to download a file. This is useful if the transfer aborts frequently or if the server is busy:
# The while/do/done loop keeps calling curl, with pauses of 10 seconds. curl will keep returning a failure exit code, which is what keeps the while loop going if inverted with the ! (logical not) operator. The -C - flag tells curl to continue at the last byte position.
while ! curl -C - -O 'http://download.parallels.com/GA/Parallels%20Desktop%203186%20Mac%20en.dmg';
do sleep 10;
done
// Extracted from SyntaxHighlighter
MultiLineCComments : new RegExp('/\\*[\\s\\S]*?\\*/', 'gm'),
SingleLineCComments : new RegExp('//.*$', 'gm'),
SingleLinePerlComments : new RegExp('#.*$', 'gm'),
DoubleQuotedString : new RegExp('"(?:\\.|(\\\\\\")|[^\\""\\n])*"','g'),
SingleQuotedString : new RegExp("'(?:\\.|(\\\\\\')|[^\\''\\n])*'", 'g')
// Seen in the Facebook Client library
} catch (e) {
if (e.number == -2146828218) {
//Permission denied
return;
}
};
# For use with VMWare when you don't run an X server:
cat /dev/zero > zero.dat ; sync ; sleep 1 ; sync ; rm -f zero.dat
/*
Created using http://jsbin.com
Source can be edit via http://jsbin.com/ukipo/edit
*/
var alldivs = document.getElementsByTagName('div');
for (var i = 0; i < alldivs.length; i++) { // infinite loop
document.body.appendChild(document.createElement('div'));
}
# Relax NG compact schema for Ant created JUnit XML files
start = testsuite | testsuites
property = element property {
attribute name {text},
attribute value {text}
}
properties = element properties {
@metafeather
metafeather / ant.xml
Last active February 5, 2022 18:16
Compile JS files to Java byte code in Ant
<!-- compile JS files to Java byte code in Ant -->
<java classname="org.mozilla.javascript.tools.jsc.Main" classpathref="rhino.class.path" fork="yes">
<arg value="-debug"/>
<arg value="${basedir}/file/1.js"/>
<arg value="${basedir}/file/2.js"/>
</java>
@metafeather
metafeather / Git Shortlog format
Created July 20, 2010 14:28
Git Shortlog format for nice lists of different files between SVN branches retaining git-svn-id's
# Git Shortlog format for nice lists of different files between SVN branches retaining git-svn-id's
git shortlog --format="%h %b %s" <branch>..master
@metafeather
metafeather / pretty git log
Created June 20, 2012 09:08
pretty git log
# pretty git log
# ref: http://coderwall.com/p/euwpig?i=3&p=1&t=git
git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --