Skip to content

Instantly share code, notes, and snippets.

Cédric cedricbonhomme

Block or report user

Report or block cedricbonhomme

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@cedricbonhomme
cedricbonhomme / create-postgreSQL-db.sh
Last active Jun 10, 2019
Creation of a PostgreSQL database
View create-postgreSQL-db.sh
sudo -u postgres createuser <username>
sudo -u postgres createdb <database>
sudo -u postgres psql
psql (11.2 (Ubuntu 11.2-1))
Type "help" for help.
postgres=# alter user <username> with encrypted password '<password>';
ALTER ROLE
postgres=# grant all privileges on database <database> to <username>;
GRANT
@cedricbonhomme
cedricbonhomme / python-environment-2019.sh
Last active May 11, 2019
My Python environment in 2019
View python-environment-2019.sh
# Installation of a decent editor, emacs
$ sudo apt install emacs
# Prerequisites to build Python
$ sudo apt install make build-essential libssl-dev zlib1g-dev libbz2-dev \
libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \
xz-utils tk-dev libffi-dev liblzma-dev python-openssl
# Installation of pyenv
$ curl https://pyenv.run | bash
View newspipe-on-heroku.sh
# Run this script with one argument:
# ./newspipe-heroku.sh <name-of-your-newspipe-instance>
HEROKU_APP_NAME=$1
git clone https://github.com/newspipe/newspipe.git
cd newspipe/
heroku create $HEROKU_APP_NAME
heroku addons:add heroku-postgresql:hobby-dev
heroku config:set HEROKU=1
@cedricbonhomme
cedricbonhomme / python_installation.sh
Last active Mar 22, 2017
How I install Python on a Debian system
View python_installation.sh
sudo apt-get install -y build-essential
sudo apt-get install -y libssl-dev openssl # for pip
sudo apt-get install -y libsqlite3-dev # for sqlite
sudo apt-get install -y tk-dev # for tkinter
PYTHON_VERSION=3.6.1
wget https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tar.xz
tar -xf Python-$PYTHON_VERSION.tar.xz
rm Python-$PYTHON_VERSION.tar.xz
@cedricbonhomme
cedricbonhomme / intent_links_to_gexf.py
Last active May 12, 2016
Generates a GEXF file for Gephi based on links between intents of a set of Android applications.
View intent_links_to_gexf.py
View sudo.py
import sys, marshal, functools, subprocess
child_script = """
import marshal, sys, types;
fn, args, kwargs = marshal.load(sys.stdin)
marshal.dump(
types.FunctionType(fn, globals())(*args, **kwargs),
sys.stdout)
"""
@cedricbonhomme
cedricbonhomme / user.js
Last active Jun 7, 2017
Firefox configuration
View user.js
user_pref("beacon.enabled", false);
user_pref("browser.bookmarks.showRecentlyBookmarked", false);
user_pref("browser.ctrlTab.previews", true);
user_pref("browser.pocket.enabled", false);
user_pref("browser.search.geoip.url", "");
user_pref("browser.search.showOneOffButtons", false);
user_pref("browser.search.suggest.enabled", false);
user_pref("browser.urlbar.trimURLs", false);
user_pref("browser.urlbar.formatting.enabled", false);
user_pref("datareporting.healthreport.service.enabled", false);
View keybase.md

Keybase proof

I hereby claim:

  • I am cedricbonhomme on github.
  • I am cedricbonhomme (https://keybase.io/cedricbonhomme) on keybase.
  • I have a public key whose fingerprint is 55F5 D60E EFCA 3591 0089 18E7 A1CB 94DE 57B7 A70D

To claim this, I am signing this object:

@cedricbonhomme
cedricbonhomme / user.js
Last active Aug 29, 2015
Firefox about:config personalization
View user.js
user_pref("browser.urlbar.trimURLs", false);
user_pref("browser.urlbar.formatting.enabled", false);
user_pref("browser.search.suggest.enabled", false);
user_pref("browser.search.showOneOffButtons", false);
user_pref("geo.enabled", false);
user_pref("javascript.enabled", false);
user_pref("loop.throttled", false);
user_pref("network.http.sendRefererHeader", 0);
View Thom_Yorke.py
#
# 1. Download CSV points cloud data of Thom Yorke here:
# https://code.google.com/p/radiohead/downloads/list
# (original implementation)
# 2. Add Python mode to Processing
# 3. Load this file (or paste the contents of this file
# into Processing and save to a name and location of your choosing)
# 4. If it doesnt exist, create a folder called "data"
# inside the sketch folder.
You can’t perform that action at this time.