Skip to content

Instantly share code, notes, and snippets.

View jmeyo's full-sized avatar
👸
Focusing

Jean-Christophe Meillaud jmeyo

👸
Focusing
View GitHub Profile
@ekreutz
ekreutz / ansible_variable_precedence.md
Last active April 25, 2024 17:43
Ansible variable precedence (order, hierarchy)
@tsaqib
tsaqib / ideas.md
Last active April 14, 2024 12:48
Ideas that you can use for hackathons, competitions and research.

Ideas

I have collected and moderated these ideas from various public sources and put into one place so that problem solvers and solution developers may find inspirations. Because I wish to update it regularly, I have setup as a single page wiki. You may try these ideas on hackathons/competitions/research; some are quite intense problems and some are not. Many of the problems were prepared keeping Dhaka/Bangladesh in mind, but of course can be applied to just about any underdeveloped/developing and sometimes developed countries.

Categories:
  • Eradicate Extreme Poverty and Hunger
  • Education
  • Healthcare
  • Governance
@noppolp
noppolp / php-on-nginx
Last active August 29, 2015 14:11
Install PHP on nginx
### PhpMyAdmin (by different root)
$ sudo apt-get install php5-mysql phpmyadmin
$ sudo apt-get install php5-fpm
$ sudo nano /etc/nginx/sites-available/default
location /phpmyadmin {
root /usr/share/;
index index.php index.html index.htm;
#!/bin/sh
git filter-branch --env-filter '
OLD_EMAIL="your-old-email@example.com"
CORRECT_NAME="Your Correct Name"
CORRECT_EMAIL="your-correct-email@example.com"
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
then
@jmeyo
jmeyo / beaudev_docker_nginx_proxy_host.sh
Last active May 16, 2016 10:41
Beaudev simple script to add a nginx vhost reverse proxying to a docker instance
#!/bin/bash
# add vhost reverse proxy for new docker instance for nginx and restart nginx
# use like this : do_nginx_proxy_vhost subdir.example.com http://192.168.0.20:8080
function do_nginx_proxy_vhost() {
[ -z $1 -o -z $2 ] && echo "Give host and address" && return
host=$1
address=$2
[ -f /etc/nginx/sites-available/proxy_reverse_$host ] && (echo "Updating proxy for host: $host" && sudo rm /etc/nginx/sites-enabled/proxy_reverse_$host) || echo "Creating proxy for host: $host"
@jmeyo
jmeyo / beaudev_docker_aliases.sh
Last active December 31, 2017 00:03
Beaudev Docker alias and usefull functions
#!/bin/bash
# Get id, name and ip adresses of all active docker container
function do_get_ip_address() {
paste <(sudo docker ps | tail -n +2 | awk {'printf "%s\t%s\n", $1, $2 '}) <(sudo docker ps -q | xargs sudo docker inspect | tail -n +2 | grep \"IPAddress\" | awk '{ print $2 }' | tr -d ',"')
}
# stop and remove a container based on his id
function do_stop_rm_container() {
[ -z "$1" ] && echo "Give me a container ID" && return
@jmeyo
jmeyo / install-dacorp-symfony-manager.sh
Last active August 29, 2015 13:57
Installer for dacorp symfony manager
#!/bin/bash -x
# https://github.com/jmeyo/dacorp-symfony-manager installer script
if [ "x"$USER != 'x' ]; then
if [ "x"$USER != 'xroot' ]; then
sm_path=$HOME/.symfony-manager
else
sm_path=/root/.symfony-manager
fi
else
sm_path=/root/.symfony-manager
@jbenet
jbenet / simple-git-branching-model.md
Last active April 9, 2024 03:31
a simple git branching model

a simple git branching model (written in 2013)

This is a very simple git workflow. It (and variants) is in use by many people. I settled on it after using it very effectively at Athena. GitHub does something similar; Zach Holman mentioned it in this talk.

Update: Woah, thanks for all the attention. Didn't expect this simple rant to get popular.

@scribu
scribu / git-fix-remote.sh
Last active November 19, 2017 16:27
Fixes the annoying "You can't push to X. Use Y" git error.
#!/usr/bin/env bash
# Fixes the annoying "You can't push to X. Use Y" git error.
while read -r line
do
read -a array <<< "$line"
remote="${array[0]}"
url="${array[1]}"
@utsengar
utsengar / gmail_analyze.py
Created May 24, 2012 07:55
Analyze gmail data
#Install scipy: http://glowingpython.blogspot.it/2012/05/analyzing-your-gmail-with-matplotlib.html
from imaplib import IMAP4_SSL
from datetime import date,timedelta,datetime
from time import mktime
from email.utils import parsedate
from pylab import plot_date,show,xticks,date2num
from pylab import figure,hist,num2date
from matplotlib.dates import DateFormatter