Skip to content

Instantly share code, notes, and snippets.

View paulccarey's full-sized avatar
🙂

Paul Carey paulccarey

🙂
  • Indeed.com
  • Liverpool/Manchester, UK
View GitHub Profile
@paulccarey
paulccarey / gist:cdf3e247116848a50fba
Created November 4, 2015 13:43 — forked from leftclickben/gist:322b7a3042cbe97ed2af
Steps to migrate from SVN to GitLab

Steps to migrate from SVN to GitLab

This process worked for me. I take no responsibility for any damage or loss incurred as a result of following or not following these steps or, for that matter, anything else you might do or not do.

Setup

  • SVN is hosted at svn.domain.com.au.
  • SVN is accessible via http (other protocols should work).
  • GitLab is hosted at git.domain.com.au and:
@paulccarey
paulccarey / osx-install-and-proxy.md
Last active September 9, 2015 14:43 — forked from josiah14/osx-install-and-proxy.md
OSX Installation and Proxy configuration

The setup for getting docker working on OSX behind a proxy is slightly more complex than just following the instructions on the Docker website. I found the information I needed at the below 2 links, but I'm copying the information here in case for some reason those links break or go away.

For Docker 1.4.1

Missing from the official install guide at the time of writing

First, install Docker normally according to the website: https://docs.docker.com/installation/mac/

Open up your ~/.bashrc or ~/.zshrc (depending on which shell you're using) and add the Docker environment variables by adding the following lines to the file:

@paulccarey
paulccarey / download
Last active August 27, 2015 11:55 — forked from guzart/download
bash: Download and Compress Rails API
#!/bin/bash
rm -rf api.rubyonrails.org/
wget -r -k -p http://api.rubyonrails.org/
rm rails_api.rar
rar a -r rails_api.rar api.rubyonrails.org/
# based on json from https://github.com/citricsquid/httpstatus.es
informational:
100:
code: "100"
title: "Continue"
summary: "Client should continue with request"
descriptions:
wikipedia:
body: "This means that the server has received the request headers, and that the client should proceed to send the request body (in the case of a request for which a body needs to be sent; for example, a POST request). If the request body is large, sending it to a server when a request has already been rejected based upon inappropriate headers is inefficient. To have a server check if the request could be accepted based on the request's headers alone, a client must send Expect: 100-continue as a header in its initial request and check if a 100 Continue status code is received in response before continuing (or receive 417 Expectation Failed and not continue)."
link: "http://en.wikipedia.org/wiki/List_of_HTTP_status_codes#100"
@paulccarey
paulccarey / cap_select_git_branch.rb
Created October 27, 2010 11:07
capistrano select git branch
set :branch do
branches=`git branch -r | sed "1 d"`.split
branches.map { | b | b.gsub!("origin/","") }
puts "What branch would you like to deploy from?"
branches.each_index do | i |
puts((i+1).to_s + ": " + branches[i])
end