This file contains 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 ruby | |
# | |
# Git commit-msg hook. If your branch name is in the form "t123", automatically | |
# adds "Refs #123." to commit messages unless they mention "#123" already. | |
# Include "#close" or "#finish" to add "Closes #123." | |
# | |
# For Pivotal Tracker, branch names like "s123" adds "[#123]". | |
# Include "#close" or "#finish" to add "[Finishes #123]". | |
# | |
# If you include "#noref" in the commit message, nothing will be added to |
This file contains 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
//Jobs currently building or in the queue | |
jobs = hudson.model.Hudson.instance.items.findAll{job -> job.isBuilding()} + hudson.model.Hudson.instance.items.findAll{job -> job.isInQueue()} | |
//Keep only the names from the collected job objects | |
jobs = jobs.collect{x -> x.name} | |
//get current job name | |
currentJob = Thread.currentThread().executable.toString().split()[0] | |
//cut current job from the jobs list |
This file contains 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
#============================================================== | |
# .picasa.ini FILE STRUCTURE | |
# | |
# reverse-engineered by Franz Buchinger <[email protected]> | |
# licensed to the public domain | |
# | |
# Picasa Version(s): 3.8.0 | |
# | |
# Changelog: | |
# v0.1: initial release |
This file contains 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
import org.gradle.api.DefaultTask | |
import org.gradle.api.Project | |
import org.gradle.api.plugins.BasePlugin | |
/** | |
* apply this plugin after doing all dependency and repo stuff. It will create two idea 'libraries' per subproject | |
* and add them to your .iml files | |
* | |
* Forked from https://gist.github.com/360092 | |
* |
This file contains 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
# Setting up dnsmasq for Local Web Development Testing on any Device | |
Please note, these instructions are for OS X Lion. | |
First, you need to get the IP address of your machine on your local network. In OS X, the easiest place to find this is in System Preferences > Network. If you're using DHCP on your local network, you will want to make sure your computer requests the same IP address when it renews it's IP address lease. I recommend configuring the DCHP Reservation settings on your router to accomplish this. Otherwise, you can specify a manual address in your network settings: | |
1. Go to *System Preferences > Network* | |
1. Click *Advanced...* |
This file contains 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
List.metaClass.collectWithIndex = { yield -> | |
def collected = [] | |
delegate.eachWithIndex { listItem, index -> | |
collected << yield(listItem, index) | |
} | |
return collected | |
} | |
assert [1, 1, 1, 1, 1].collectWithIndex { it, index -> it + index } == [1, 2, 3, 4, 5] |
This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<xsl:stylesheet version="1.0" | |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | |
xmlns:ttml="http://www.w3.org/ns/ttml" | |
xmlns:tts="http://www.w3.org/2006/04/ttaf1#styling"> | |
<xsl:output | |
method="text" | |
indent = "no" | |
encoding="UTF-8"/> |
This file contains 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 | |
exec <"$0" || exit; read v; read v; exec /usr/bin/osascript - "$@"; exit | |
-- the above is some shell trickery that lets us write the rest of | |
-- the file in plain applescript | |
tell application "Google Chrome" | |
activate | |
tell application "System Events" | |
tell process "Google Chrome" |
This file contains 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
// Just before switching jobs: | |
// Add one of these. | |
// Preferably into the same commit where you do a large merge. | |
// | |
// This started as a tweet with a joke of "C++ pro-tip: #define private public", | |
// and then it quickly escalated into more and more evil suggestions. | |
// I've tried to capture interesting suggestions here. | |
// | |
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_, | |
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant, |
OlderNewer