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
import org.jboss.aesh.cl.CommandDefinition; | |
import org.jboss.aesh.cl.GroupCommandDefinition; | |
import org.jboss.aesh.cl.Option; | |
import org.jboss.aesh.console.AeshConsole; | |
import org.jboss.aesh.console.AeshConsoleBuilder; | |
import org.jboss.aesh.console.Prompt; | |
import org.jboss.aesh.console.command.Command; | |
import org.jboss.aesh.console.command.CommandResult; | |
import org.jboss.aesh.console.command.invocation.CommandInvocation; | |
import org.jboss.aesh.console.command.registry.AeshCommandRegistryBuilder; |
import jenkins.* | |
import hudson.* | |
import com.cloudbees.plugins.credentials.* | |
import com.cloudbees.plugins.credentials.common.* | |
import com.cloudbees.plugins.credentials.domains.* | |
import com.cloudbees.jenkins.plugins.sshcredentials.impl.* | |
import hudson.plugins.sshslaves.*; | |
import hudson.model.* | |
import jenkins.model.* | |
import hudson.security.* |
#!/bin/bash | |
instance_profile=`curl http://169.254.169.254/latest/meta-data/iam/security-credentials/` | |
aws_access_key_id=`curl http://169.254.169.254/latest/meta-data/iam/security-credentials/${instance_profile} | grep AccessKeyId | cut -d':' -f2 | sed 's/[^0-9A-Z]*//g'` | |
aws_secret_access_key=`curl http://169.254.169.254/latest/meta-data/iam/security-credentials/${instance_profile} | grep SecretAccessKey | cut -d':' -f2 | sed 's/[^0-9A-Za-z/+=]*//g'` | |
token=`curl -s http://169.254.169.254/latest/meta-data/iam/security-credentials/${instance_profile} | sed -n '/Token/{p;}' | cut -f4 -d'"'` | |
file="somefile.deb" | |
bucket="some-bucket-of-mine" | |
date="`date +'%a, %d %b %Y %H:%M:%S %z'`" |
#!/bin/bash | |
set -e | |
if [ $# -eq 0 ]; then | |
echo "USAGE: $0 plugin1 plugin2 ..." | |
exit 1 | |
fi | |
plugin_dir=/var/lib/jenkins/plugins |
<?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" /> |
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 |
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) { |
package main | |
import ( | |
"bytes" | |
"fmt" | |
"io" | |
"log" | |
"mime/multipart" | |
"net/http" | |
"os" |
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
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.