Skip to content

Instantly share code, notes, and snippets.

View cedricbonhomme's full-sized avatar

Cédric Bonhomme cedricbonhomme

View GitHub Profile
@cedricbonhomme
cedricbonhomme / newspipe-on-heroku.sh
Last active November 21, 2016 10:03
Deploy @NewsPipe on Heroku
# 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 / user.js
Last active June 7, 2017 20:47
Firefox configuration
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);
@cedricbonhomme
cedricbonhomme / create-postgreSQL-db.sh
Last active June 10, 2019 09:40
Creation of a PostgreSQL database
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_installation.sh
Last active December 11, 2019 10:11
How I install Python on a Debian system
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 / python-environment-2019.sh
Last active December 15, 2019 20:11
My Python environment for 2019
# 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
@cedricbonhomme
cedricbonhomme / stale.yml
Created July 10, 2020 12:16
Close stale issues
name: "Close stale issues"
on:
schedule:
- cron: "15 4 * * 1,3,5"
jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v3
@cedricbonhomme
cedricbonhomme / create_object_mosp.py
Last active March 7, 2021 00:39
Example creation of object on MOSP
#! /usr/bin/env python
# -*- coding: utf-8 -
import requests
import uuid
# The JSON object
json_object = {
"authors": ["Consortium GARR [www.garr.it]"],
@cedricbonhomme
cedricbonhomme / check-translations.sh
Last active May 11, 2021 19:41
check-translations.sh
#!/bin/bash
# Defore executing this script you must install curl and jq:
# sudo apt-get install curl jq
set -e
# database user:
@cedricbonhomme
cedricbonhomme / compile-mod-wsgi.sh
Last active October 17, 2021 16:08
compile, install mod-wsgi and compile Python with shared libraries support
# Configure and install pyenv:
# https://gist.github.com/cedricbonhomme/ababe00d0a675ea5c69d777276e8f375
# Install apxs2:
sudo apt install apache2-dev
# Install Python with shared libraries support:
CONFIGURE_OPTS=--enable-shared pyenv install 3.10.0
@cedricbonhomme
cedricbonhomme / python-environment-2021.sh
Last active November 24, 2021 13:47
My Python environment for 2021
# 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 libxml2-dev libxslt-dev libpq-dev python3-openssl