Skip to content

Instantly share code, notes, and snippets.

View support_redirect.patch
diff --git a/lib/berkshelf/community_rest.rb b/lib/berkshelf/community_rest.rb
index 42c51d2..b791f23 100644
--- a/lib/berkshelf/community_rest.rb
+++ b/lib/berkshelf/community_rest.rb
@@ -75,6 +75,7 @@ def initialize(uri = V1_API, options = {})
options[:builder] ||= Faraday::RackBuilder.new do |b|
b.response :parse_json
b.response :gzip
+ b.response :follow_redirects
b.request :retry,
@charlesjohnson
charlesjohnson / gemrc.erb
Last active Aug 29, 2015
Use a .gemrc file with Omnibus chef-client
View gemrc.erb
:sources:
- http://<%= node['gem_file']['host'] %>:<%= node['gem_file']['port'] %>/
@marcinb
marcinb / bbc_recipes.coffee
Created Oct 7, 2011
Chicken soup recipes
View bbc_recipes.coffee
page = require('webpage').create()
injectjQuery = ->
# phantom allows to dynamically inject any javascript
# into page context.
# Make sure you add jquery to your script dir.
page.injectJs './jquery.js'
# ALWAYS do that when injecting jQuery into other page
page.evaluate ->
View gist:1391824
/**
* Copyright (c) 2011 Red Hat, Inc.
*
* This software is licensed to you under the GNU General Public License,
* version 2 (GPLv2). There is NO WARRANTY for this software, express or
* implied, including the implied warranties of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
* along with this software; if not, see
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
*
@chowey
chowey / syntax.js
Created Feb 18, 2012
Jade Syntax Checker
View syntax.js
var jade = require('jade'),
runtime = require('jade/lib/runtime'),
spawn = require('child_process').spawn,
fs = require('fs');
function parse(str, filename){
var options = {filename: filename, compileDebug: true};
try {
// Parse
var parser = new jade.Parser(str, filename, options)
@sperlic
sperlic / fabfile.py
Created May 13, 2012 — forked from whiteinge/fabfile.py
Example fabric script with VirtualBox automation
View fabfile.py
# -*- coding: utf-8 -*-
"""MyCompany Fabric script.
* Deploy code
* Set up a local development environment
There are two ways to deploy the myrepo code:
1. :func:`deploy` will do a full virtualenv installation/update and expand a
tarball of the specified git revision (defaults to HEAD) to a timestamped
@jtimberman
jtimberman / rename-node.rb
Created Mar 2, 2012 — forked from mpasternacki/rename-node.rb
A knife exec script to change Chef node's name.
View rename-node.rb
#!./bin/knife exec
# A knife exec script to change chef node's name, preserving all the attributes.
#
# Usage: knife exec rename-node.rb old-name new-name
#
# Script retrieves the Node object, changes its 'name' attribute,
# creates new Node object with updated name and rest of attributes
# untouched. Then it deletes old Node and Client objects from
# database, and logs into the server to update it:
@fnichol
fnichol / 00_README.md
Created Dec 20, 2012
Chef Metadata Chopper!
View 00_README.md

MetadataChopper

MetadataChopper.extract('metdata.rb') # => [ "rvm", "0.9.1" ]
@Hydrotoast
Hydrotoast / AdversarialSearchAI.java
Last active Dec 10, 2015
An pseudocode AI demonstrating the Minimax algorithm. Note that the algorithm has two helper functions: min and max.
View AdversarialSearchAI.java
class AdversarialSearchAI {
private PieceType piece;
public AdversarialSearchAI(PieceType piece) {
this.piece = piece;
}
/**
* Returns the best move given the state of the game
*/
View gist:5081375
What kind of new features would you be happy to see in Apache Maven new major release ?