Skip to content

Instantly share code, notes, and snippets.

@hedgehog
hedgehog / gist:1110674
Created July 28, 2011 00:36 — forked from rowan-m/gist:1026918
update jenkins Updatecenter from CLI
$ java -jar jenkins-cli.jar -s http://localhost:9000 install-plugin findbugs
findbugs is neither a valid file, URL, nor a plugin artifact name in the update center
No update center data is retrieved yet from: http://updates.jenkins-ci.org/update-center.json
findbugs looks like a short plugin name. Did you mean 'null'?
# Specifying a full URL works!
$ java -jar jenkins-cli.jar -s http://localhost:9020 install-plugin http://updates.jenkins-ci.org/download/plugins/AdaptivePlugin/0.1/AdaptivePlugin.hpi
# Get the update center ourself
source 'http://rubygems.org'
gem 'ruby-libvirt'
gem 'ruby-vnc'
@hedgehog
hedgehog / chef_solo_patch.rb
Created June 28, 2011 02:12 — forked from timdiggins/chef_solo_patch.rb
Monkeypatch for chef solo to do basic data_bag manipulations
# save this in the library folder of a cookbook
# (e.g. ./coookbooks/vagrant/library/chef_solo_patch.rb)
# see also https://gist.github.com/867958 for vagrant patch
# based on http://lists.opscode.com/sympa/arc/chef/2011-02/msg00000.html
if Chef::Config[:solo]
class Chef
module Mixin
module Language
def data_bag(bag)
# Author:: Adam Jacob <[email protected]>
# Author:: Joshua Timberman <[email protected]>
#
# Copyright 2009-2010, Opscode, Inc
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#!/bin/sh
# standard ubuntu gem pakage adds alternative for gem
# it should be removed first time
#
# update-alternatives --remove-all gem
update-alternatives --remove-all ruby
update-alternatives --install /usr/bin/ruby ruby /opt/ruby-enterprise/bin/ruby 600 \

GitHub OAuth Busy Developer's Guide

This is a quick guide to OAuth2 support in GitHub for developers. This is still experimental and could change at any moment. This Gist will serve as a living document until it becomes finalized at Develop.GitHub.com.

OAuth2 is a protocol that lets external apps request authorization to private details in your GitHub account without getting your password. All developers need to register their application before getting started.

Web Application Flow

  • Redirect to this link to request GitHub access:
@hedgehog
hedgehog / ubuntu10.04-ruby192.erb
Created June 15, 2011 06:03 — forked from czottmann/ubuntu10.04-ruby192.erb
Ubuntu 10.04 + Ruby 1.9.2p180 chef bootstrap file
bash -c '
if [ ! -f /usr/local/bin/chef-client ]; then
apt-get update
apt-get -y upgrade
apt-get install -y build-essential wget zlib1g-dev libssl-dev libffi-dev
cd /usr/src
wget ftp://ftp.ruby-lang.org//pub/ruby/1.9/ruby-1.9.2-p180.tar.bz2
tar xjf ruby-1.9.2-p180.tar.bz2
cd ruby-1.9.2-p180
./configure
@hedgehog
hedgehog / chef-010-apt.erb
Created June 15, 2011 06:02 — forked from jtimberman/chef-010-apt.erb
Bootstrap template for chef 0.10 with apt.opscode.com, save as ~/.chef/bootstrap/chef-010-apt.erb
bash -c '
if [ ! -f /usr/bin/chef-client ]; then
echo "chef chef/chef_server_url string <%= Chef::Config[:chef_server_url] %>" | debconf-set-selections
[ -f /etc/apt/sources.list.d/opscode.list ] || echo "deb http://apt.opscode.com `lsb_release -cs`-0.10 main" > /etc/apt/sources.list.d/opscode.list
wget -O- http://apt.opscode.com/[email protected] | apt-key add -
fi
apt-get update
apt-get install -y chef
<% unless Chef::Config[:validation_client_name] == "chef-validator" -%>
@hedgehog
hedgehog / split_repo.bash
Created June 14, 2011 10:56 — forked from pk/split_repo.bash
Extract directory from the GIT repo to the standalone GIT repo.
#!/bin/bash
FROM=$1
TO=$2
echo "Spliting '$TO' from '$FROM'"
git clone --no-hardlinks $FROM $TO
cd $TO
git filter-branch --subdirectory-filter $TO HEAD -- --all
git reset --hard
git gc --aggressive
git prune
@hedgehog
hedgehog / ubuntu.sh
Created June 9, 2011 05:48 — forked from DAddYE/ubuntu.sh
Install Padrino on Ubuntu
# Setup Ubuntu LTS 10.4
sudo apt-get install ruby
sudo apt-get install ruby-dev
sudo apt-get install sqlite
sudo apt-get install libsqlite3-dev
sudo apt-get install irb
sudo apt-get install rdoc
sudo apt-get install libopenssl-ruby
sudo apt-get install g++
wget http://rubyforge.org/frs/download.php/69365/rubygems-1.3.6.tgz