Skip to content

Instantly share code, notes, and snippets.

Avatar

Jimmy Eisenhauer jimmyeisenhauer

View GitHub Profile
@jcouyang
jcouyang / Stop_build_if_PR.sh
Last active Jun 15, 2020
make Bamboo support Github Pull Request with Status API
View Stop_build_if_PR.sh
#!/bin/bash
if [[ -n ${bamboo_pull_num} ]]; then
echo 'stoping bamboo'
curl "http://${bamboo_BAMBOO_USER}:${bamboo_BAMBOO_password}@your.bamboo.domain/build/admin/stopPlan.action?${bamboo.planResultKey}-${bamboo.buildNumber}"
fi
@korczis
korczis / deferredRequest.js
Last active Aug 22, 2017
Deferred wrapper of cherio request
View deferredRequest.js
var deferred = require('deferred'),
request = require('request'),
cheerio = require('cheerio');
var deferredRequest = function(url) {
var d = deferred();
request(url, function (err, resp, body) {
if(err) {
d.reject(new Error("Unable to fetch '" + url + "', reason: " + err));
@niallo
niallo / gist:3109252
Created Jul 14, 2012
Parse Github `Links` header in JavaScript
View gist:3109252
/*
* parse_link_header()
*
* Parse the Github Link HTTP header used for pageination
* http://developer.github.com/v3/#pagination
*/
function parse_link_header(header) {
if (header.length == 0) {
throw new Error("input must not be of zero length");
}
View Procfile
# Only listen on http; disable ajp and https
web: java -jar jenkins.war --httpPort=$PORT --ajp13Port=-1 --httpsPort=-1
@hugs
hugs / center-ios-simulator.script
Created Apr 4, 2012
Center the iOS Simulator's window on your screen
View center-ios-simulator.script
-- Center the iOS Simulator's window on your screen
--
-- Copyright (C) 2012 Sauce Labs Inc
--
-- This work is licensed under the Creative Commons Attribution 3.0 Unported License.
-- To view a copy of this license, visit http://creativecommons.org/licenses/by/3.0/
-- or send a letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA.
--
-- Usage:
-- $ osascript center-ios-simulator.script <scale>