Download logstash:
wget https://logstash.objects.dreamhost.com/release/logstash-1.1.5-monolithic.jar
Edit your $GROOVY_HOME/conf/groovy-start.conf and add the following line: | |
load !{user.home}/.groovy/grapes/**.jar | |
After that your @Grab will work as advertised: | |
#!/usr/bin/env groovy | |
@Grab(group='mysql', module='mysql-connector-java', version='5.1.12') | |
import groovy.sql.Sql |
#!/bin/sh | |
# Current as working as of 2012/4/17 | |
# Xcode 4.3.2 | |
PROJECT_ROOT="$HOME/SomeDirWhereYourProjectLives/XXXXXXXX" | |
WORKSPACE="$PROJECT_ROOT/XXXXXXXX.xcodeproj/project.xcworkspace" | |
CONFIG="AdHoc" | |
SCHEME="XXXXXXXX" |
GitHub's compare view is available at:
https://github.com/$USER/$REPO/compare/$REV_A...$REV_B
Naturally, $USER
and $REPO
are the owner (user/organization) and repository names, respectively.
$REV{A,B}
are the two sides of the compare view; they can either be a ref in $USER
's repository, i.e. the name of a branch, tag or a commit SHA, or it can be a ref in $OWNER
's fork of the repository by using the format $OWNER:$REF
.
You can get a diff or patch for the result of the compare view by appending .diff
or .patch
to the URL, respectively.
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
package main | |
import ( | |
"bytes" | |
"fmt" | |
"io" | |
"log" | |
"mime/multipart" | |
"net/http" | |
"os" |
public class RoboActionBarActivity extends ActionBarActivity implements RoboContext { | |
protected EventManager eventManager; | |
protected HashMap<Key<?>, Object> scopedObjects = new HashMap<Key<?>, Object>(); | |
@Inject | |
ContentViewListener ignored; // BUG find a better place to put this | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { |
def getCheckedOutGitCommitHash() { | |
def gitFolder = "$projectDir/.git/" | |
def takeFromHash = 12 | |
/* | |
* '.git/HEAD' contains either | |
* in case of detached head: the currently checked out commit hash | |
* otherwise: a reference to a file containing the current commit hash | |
*/ | |
def head = new File(gitFolder + "HEAD").text.split(":") // .git/HEAD | |
def isCommit = head.length == 1 // e5a7c79edabbf7dd39888442df081b1c9d8e88fd |
<?xml version="1.0" encoding="utf-8"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="schwiz.net.weartest" > | |
<application | |
android:allowBackup="true" | |
android:icon="@drawable/ic_launcher" | |
android:label="@string/app_name" | |
android:theme="@style/AppTheme" > | |
<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" /> |
#!/bin/bash | |
set -e | |
if [ $# -eq 0 ]; then | |
echo "USAGE: $0 plugin1 plugin2 ..." | |
exit 1 | |
fi | |
plugin_dir=/var/lib/jenkins/plugins |