jenkins_url
+ /api/json?tree=jobs[name,color]
jenkins_url
+ /job/${job_name}/api/json?tree=builds[number,status,timestamp,id,result]
cd ~/Desktop | |
curl -O http://darwinports.opendarwin.org/downloads/DarwinPorts-1.2-10.4.dmg | |
hdiutil attach DarwinPorts-1.2-10.4.dmg | |
cd /Volumes/DarwinPorts-1.2/ | |
sudo installer -pkg DarwinPorts-1.2.pkg -target "/" |
<!doctype html><meta charset=utf-8 ><title>*Iframe `@srcdoc` test</title> | |
<style>iframe{ border:1px solid #aaa; }</style> | |
<h1>Iframe `@srcdoc` test</h1> | |
<iframe | |
width=400 height=300 data-X_frameborder=0 | |
seamless data-X_sandbox | |
srcdoc= | |
"<!doctype html><hr />iframe - I'm in a `@srcdoc` attribute! |
// The following could have been replaced by setting `Backbone.emulateHTTP = true;` | |
Backbone._sync = Backbone.sync; | |
Backbone.sync = function( method, model, options ) { | |
var beforeSend = options.beforeSend; | |
options = options || {}; | |
if ( method === "update" || method === "delete" || method === "patch" ) { | |
options.beforeSend = function( xhr ) { |
git clone git://github.com/sstephenson/rbenv.git /usr/local/rbenv | |
echo '# rbenv setup' > /etc/profile.d/rbenv.sh | |
echo 'export RBENV_ROOT=/usr/local/rbenv' >> /etc/profile.d/rbenv.sh | |
echo 'export PATH="$RBENV_ROOT/bin:$PATH"' >> /etc/profile.d/rbenv.sh | |
echo 'eval "$(rbenv init -)"' >> /etc/profile.d/rbenv.sh | |
chmod +x /etc/profile.d/rbenv.sh | |
source /etc/profile.d/rbenv.sh | |
git clone https://github.com/sstephenson/ruby-build.git /usr/local/rbenv/plugins/ruby-build | |
rbenv install 1.9.3-p392 |
#!/bin/bash | |
set -e | |
set -u | |
CI_MASTER_URL="http://ci-1" | |
node_online() { | |
curl --silent "$CI_MASTER_URL/computer/$1/api/json" | grep --silent '"temporarilyOffline":false' | |
} |
//http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript | |
Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15); |
Configuring Nginx to serve SSL content is straight forward, once you have your certificate and key ready:
server {
listen 443 default ssl;
root /path/to/source;
server_name mydomain;
ssl_certificate /path/to/cert;
ssl_certificate_key /path/to/key;
#!/bin/sh | |
parse_yaml() { | |
local prefix=$2 | |
local s='[[:space:]]*' w='[a-zA-Z0-9_]*' fs=$(echo @|tr @ '\034') | |
sed -ne "s|^\($s\)\($w\)$s:$s\"\(.*\)\"$s\$|\1$fs\2$fs\3|p" \ | |
-e "s|^\($s\)\($w\)$s:$s\(.*\)$s\$|\1$fs\2$fs\3|p" $1 | | |
awk -F$fs '{ | |
indent = length($1)/2; | |
vname[indent] = $2; | |
for (i in vname) {if (i > indent) {delete vname[i]}} |
Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.
In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.
Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j