Skip to content

Instantly share code, notes, and snippets.


Vincent Houlbrèque vinzeebreak

View GitHub Profile
vinzeebreak /
Created Dec 26, 2019
Move windows from unplugged screens to main window.
#!/usr/bin/env python3
import subprocess
# get the resolution of the screen (+0+0)
res = [
int(n) for n in [

As seen here:

$ (some_branch) git log
$ (some_branch) git rebase -i origin/master
vinzeebreak / stackexchange-websites.json
Created Mar 4, 2019
Stackexchange list of websites
View stackexchange-websites.json
"urls": [
vinzeebreak / disk_usage_postgre.sql
Last active Aug 1, 2018
Get the size of the tables that have a table schema of "table_schema_name"
View disk_usage_postgre.sql
SELECT *, pg_size_pretty(total_bytes) AS total
, pg_size_pretty(index_bytes) AS INDEX
, pg_size_pretty(toast_bytes) AS toast
, pg_size_pretty(table_bytes) AS TABLE
SELECT *, total_bytes-index_bytes-COALESCE(toast_bytes,0) AS table_bytes FROM (
SELECT c.oid,nspname AS table_schema, relname AS TABLE_NAME
, c.reltuples AS row_estimate
, pg_total_relation_size(c.oid) AS total_bytes
, pg_indexes_size(c.oid) AS index_bytes
git remote add upstream https://[upstream guy's repo url]  
git fetch upstream  
git reset --hard upstream/master
vinzeebreak /
Last active Mar 30, 2021
Make conda environments visible in nteract

Nteract tricks

To add a conda environment to the list of environments:

$ source activate thisenv
(thisenv) $ pip install ipykernel
(thisenv) $ python -m ipykernel install --user --name thisenv