Skip to content

Instantly share code, notes, and snippets.

View kreeger's full-sized avatar

Ben Kreeger kreeger

View GitHub Profile
@tmatilai
tmatilai / README.md
Last active January 3, 2016 14:39
Install vagrant-berkshelf (and berkshelf) from their git repositories

IMHO the correct way to install bleeding edge plugins to Vagrant is to use the standard Vagrant installer.

These instructions should work for Vagrant 1.1.0 - 1.4.x (but probably not for Vagrant 1.5+),

git clone https://github.com/berkshelf/berkshelf.git
cd berkshelf
gem build berkshelf.gemspec

# Install directly to Vagrant's gem storage, as this is not a plugin
@uberllama
uberllama / gist:6977242
Last active December 25, 2015 12:29
Modified DelayedJob workflow to use the Document's ID rather than serializing the entire Document object.
class Document < ActiveRecord::Base
# Environment-specific direct upload url verifier screens for malicious posted upload locations.
DIRECT_UPLOAD_URL_FORMAT = %r{\Ahttps:\/\/s3\.amazonaws\.com\/myapp#{!Rails.env.production? ? "\\-#{Rails.env}" : ''}\/(?<path>uploads\/.+\/(?<filename>.+))\z}.freeze
belongs_to :user
has_attached_file :upload
validates :direct_upload_url, presence: true, format: { with: DIRECT_UPLOAD_URL_FORMAT }
@johanneswuerbach
johanneswuerbach / .travis.yml
Last active March 24, 2025 17:40
Deploy an iOS app to testflight using Travis CI
---
language: objective-c
before_script:
- ./scripts/travis/add-key.sh
after_script:
- ./scripts/travis/remove-key.sh
after_success:
- ./scripts/travis/testflight.sh
env:
global:
@ngauthier
ngauthier / README.md
Last active December 8, 2023 13:56
install ruby 2.0.0-p0 on ubuntu
@kreeger
kreeger / uncross.rb
Last active December 10, 2015 23:55
XML => acrosslite.
#!/usr/bin/env ruby
require 'nokogiri'
require 'ostruct'
# Read in the file, convert to UTF-8 if needed, and parse with Nokogiri.
glob = ARGV[0]
exit if glob.nil?
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = [email protected]:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@moklett
moklett / openconnect.md
Created July 24, 2012 15:21
OpenConnect VPN on Mac OS X

Unfortunately, the Cisco AnyConnect client for Mac conflicts with Pow. And by "conflicts", I mean it causes a grey-screen-of-death kernel panic anytime you connect to the VPN and Pow is installed.

As an alternative, there is OpenConnect, a command-line client for Cisco's AnyConnect SSL VPN.

Here's how to get it set up on Mac OS X:

  1. OpenConnect can be installed via homebrew:

     brew update
    

brew install openconnect

@jordelver
jordelver / gist:3073101
Created July 8, 2012 22:06
Set the Mac OS X SOCKS proxy on the command line

Set the Mac OS X SOCKS proxy on the command line

a.k.a. what to do when your ISP starts blocking sites :(

Set the SOCKS proxy to local SSH tunnel

networksetup -setsocksfirewallproxy "Ethernet" localhost 8080

To clear the domain and port

@amateurhuman
amateurhuman / gist:2005745
Created March 9, 2012 09:03
Installing Rubinius 2.0.0-dev with rbenv

Installing rbx-2.0.0-dev with Ruby 1.9 support using rbenv can be a tad tricky. This is what I did to get up and running, you'll need another version of ruby already installed as well as rake.

The basic outline:

  1. Clone Rubinius HEAD from github
  2. Configure installation for rbenv and 1.9 support
  3. Install Rubinius
  4. Configure your $PATH to use Rubinius gems
  5. Start using Rubinius
@jpfuentes2
jpfuentes2 / rbenv-install-system-wide.sh
Created March 8, 2012 19:47
CentOS: rbenv install and system wide install
#!/bin/bash
# CentOS rbenv system wide installation script
# Forked from https://gist.github.com/1237417
# Installs rbenv system wide on CentOS 5/6, also allows single user installs.
# Install pre-requirements
yum install -y gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel \
make bzip2 autoconf automake libtool bison iconv-devel git-core