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 / jenkins-port
Created January 23, 2014 20:02
Change jenkins port on ubuntu
1. Go to /etc/default folder --> Open the file "jenkins"
2. Modify the line HTTP_PORT=8080 as HTTP_PORT=80
3. Start jenkins by command: /etc/init.d/jenkins start
4. Open a browser and browse as localhost:80
@fprieur
fprieur / autoreload-Gunicorn
Last active April 16, 2023 14:28
Auto Reload Gunicorn On File Change Event
pip install watchdog -U
# now there is a command called "watchmedo", you'll like it...
# in terminal #1, run:
gunicorn app:myapp --pid=gunicorn.pid
# in terminal #2, run:
watchmedo shell-command \
--patterns="*.py;*.html;*.css;*.js" \
--recursive \
@fprieur
fprieur / ssh-key-based-access.md
Last active August 29, 2015 13:55
SSH key-based access configuration

on local machine do:

ssh-keygen and agree with all defaults (if you have no reasons do otherwise) cat ~/.ssh/id_rsa.pub and copy that key On remote machine:

mkdir ~/.ssh && chmod 700 ~/.ssh touch ~/.ssh/authorized_keys2 && chmod 600 ~/.ssh/authorized_keys2 Paste copied key into authorized_keys2

@fprieur
fprieur / gist:9007958
Created February 14, 2014 19:54
push to new remote branch
git push -u origin dev
@fprieur
fprieur / jdomtl2014.md
Last active August 29, 2015 13:56
Journée données ouvertes 2014 - Montréal
  • sensibilisation des décideurs politiques pour les données ouvertes
  • non-conférence:
    • projets:
      • alertes pour le déneigements
      • paliers gouvernemental à titre d'observateurs
      • luc lefebvre et marc lebel

======== Gouvernance

  • les élus font de la pression sur l'administratif pour la libération de données, (plan d'action de libération pour 2014)
@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:
@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 / travis-heroku.md
Created March 31, 2014 17:43
Let travis setup heroku for deploy - command line

travis setup heroku

@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 / 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) { ... }