Skip to content

Instantly share code, notes, and snippets.


Using Pyenv with virtualenv ( Ubuntu / Linux. Sorry Windows :-( )

This is a little guide to installing pyenv with virtualenv so that you never again need to worry about whether you your version of Python and pip packages are working. Pyenv is like virtualenv except that it lets you install any version of Python and then by using the pyenv plugin for virtualenv it is possible to create a box with the Python version you want plus all the packages you need.

Installing Pyenv

Run the command below to git checkout pyenv to your home directory

git clone ~/.pyenv

Keybase proof

I hereby claim:

  • I am rollick on github.
  • I am rollick ( on keybase.
  • I have a public key ASDmCFIgmDBukrMiaVWUJltkamqRhQASyZLWpVnRWMOLdAo

To claim this, I am signing this object:

View PG::Error: ERROR: new encoding (UTF8) is incompatible
======= Prolbem =================================================================================================================
I have installed : ruby-2.0.0,postgres-9.2 , now in rails app when I execute:
rake db:create , command I get:
PG::InvalidParameterValue: ERROR: new encoding (UTF8) is incompatible with the encoding of the template database (SQL_ASCII)
HINT: Use the same encoding as in the template database, or use template0 as template.
: CREATE DATABASE "my_db_name" ENCODING = 'unicode'.......
bin/rake:16:in `load'
SAUCE_TMP_DIR="$(mktemp -d)"
echo "Downloading Sauce Connect"
View testd3js.css
.bar {fill: #1D8300;}
.label {fill: #FFF; font-size:10px; font-family:sans-serif;}
fieldset {margin-bottom:20px}
rollick / gist:7416944
Last active Dec 28, 2015
Routes and Templates
View gist:7416944
Object.keys(App.Router.router.recognizer.names).forEach( function (name) {
var resolver = Ember.DefaultResolver.create(),
routeName = 'route:' + name,
parsedName = resolver.parseName(routeName),
found = typeof resolver.resolveTemplate(parsedName) == 'function' ? ' - Found!' : '',
templateName = parsedName.fullNameWithoutType.replace(/\./g, '/'),
camelizeName = Ember.String.decamelize(templateName);
console.log(routeName + ' => ' + templateName + ( camelizeName != templateName ? ' / ' + camelizeName : '' ) + found );
rollick / gist:3695704
Created Sep 11, 2012
Remove branches already in master
View gist:3695704
git checkout master
git fetch
git remote prune origin
git branch -r --merged |
grep origin |
grep -v '>' |
grep -v master |
xargs -L1 |
cut -c8- |
View feature_tour_repository.gemspec do |s| = "feature_tour_repository"
s.version = "0.8.1"
s.platform = "ruby"
s.authors = ["Glenn Tweedie", "Mark Gallop", "Agworld"] = [""]
s.homepage = ""
s.summary = "Le Tour d'Agworld"
s.description = "Feature Tour Repository"
s.required_rubygems_version = ">= 1.3.6"
rollick / po2json.js
Created May 10, 2012 — forked from zaach/po2json.js
PO parser from adapted for Node.js and modified to be more like
View po2json.js
#!/usr/bin/env node
PO parser from
adapted for Node.js and modified to be more like
- Zach Carter <>
Pure Javascript implementation of Uniforum message translation.
View paperclip_migrations.rb
module PaperclipMigrations
def self.included(base)
base.extend ClassMethods
module ClassMethods
def add_paperclip_fields(table, prefix)
add_column table, "#{prefix}_file_name", :string
add_column table, "#{prefix}_content_type", :string