Skip to content

Instantly share code, notes, and snippets.

View fprieur's full-sized avatar

Fred Prieur fprieur

  • Ubisoft
  • Montreal
View GitHub Profile
@fprieur
fprieur / docker-remove-all.sh
Created November 6, 2014 15:03
Docker remove all images or containers
# Delete all containers
docker rm $(docker ps -a -q)
# Delete all images
docker rmi $(docker images -q)
@fprieur
fprieur / new-local-and-remote-branch.md
Last active September 22, 2015 16:11
Create a new branch with his associate remote branch
git checkout -b feature_branch_name
... edit files, add and commit ...
git push -u origin feature_branch_name
@fprieur
fprieur / spookyjs_working.js
Created May 15, 2014 20:32
working example with spookyjs
try {
var Spooky = require('spooky');
} catch (e) {
var Spooky = require('../lib/spooky');
}
var spooky = new Spooky({
child: {
transport: 'http'
},
@fprieur
fprieur / casperjs-travis.md
Last active August 29, 2015 13:58
Add this to your .travis.yml if you want to run your casperjs test on travis-ci

Add this to your .travis.yml if you want to run your casperjs test on travis-ci

before_script:             
 - wget https://github.com/n1k0/casperjs/archive/1.1-beta3.tar.gz -O /tmp/casper.tar.gz
 - tar -xvf /tmp/casper.tar.gz
 - export PATH=$PATH:$PWD/casperjs-1.1-beta3/bin/
script:
    casperjs test yourtests.js
@fprieur
fprieur / media-queries-bootstrap.md
Created April 2, 2014 17:34
Media queries for bootstrap 3
/* Large desktop */ 
@media (min-width: 1200px) { ... } 

/* Portrait tablet to landscape and desktop */ 
@media (min-width: 768px) and (max-width: 979px) { ... } 

/* Landscape phone to portrait tablet */ 
@media (max-width: 767px) { ... } 
@fprieur
fprieur / heroku-env.md
Created March 31, 2014 19:45
Set up heroku env variable on app

heroku config:set HEROKU=1

@fprieur
fprieur / travis-heroku.md
Created March 31, 2014 17:43
Let travis setup heroku for deploy - command line

travis setup heroku

@fprieur
fprieur / postgresl-ubuntu.md
Created March 18, 2014 13:52
Correctly use and install postgresql on ubuntu

The first thing to do is to install the dependencies.

sudo apt-get build-dep python-psycopg2

After that go inside your virtualenv and use pip install psycopg2

@fprieur
fprieur / config.py
Created March 15, 2014 02:44
Postgresql config for local and heroku with peewee ORM
#heroku config:set HEROKU=1
import os
import urlparse
import psycopg2
from flask import Flask
from flask_peewee.db import Database
if 'HEROKU' in os.environ: