Skip to content

Instantly share code, notes, and snippets.

View misterjoa's full-sized avatar
🤓

Joachim Kruithof misterjoa

🤓
View GitHub Profile
@misterjoa
misterjoa / cmake+pyenv
Created October 28, 2019 21:35
cmake and pyenv : use right version of interpreter and libs
cmake -DPYTHON_LIBRARY=${HOME}/.pyenv/versions/3.8.0/lib/libpython3.8.a -DPYTHON_INCLUDE_DIR=${HOME}/.pyenv/versions/3.8.0/include/python3.8/ cern_root/
@misterjoa
misterjoa / remove_all_cups_printers.sh
Created October 26, 2019 22:00
remove all cups printers
#!/usr/bin/bash
lpstat -p|grep ^printer|awk '{print $2}'|sed -s 's/inconnue//g'>printers.txt
cat printers.txt | xargs -L1 lpadmin -x
@misterjoa
misterjoa / ipython_fft_example.ipynb
Created March 8, 2019 11:07 — forked from jedludlow/ipython_fft_example.ipynb
IPython Notebook FFT Example
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# docker format terminal the right way
# use it like this
# goinside ${CONTAINER_ID}
goinside(){
docker exec -it $1 bash -c "stty cols $COLUMNS rows $LINES && bash";
}
@misterjoa
misterjoa / get_repo_list.py
Last active October 5, 2018 12:06
Get repo list from github python API
#!/usr/bin/env python
"""
Get a github API token using your account
Then input the name of your org, don't forget '/' at the end.
"""
GH_TOKEN = "XXX"
GH_ORG = "your_org/"
@misterjoa
misterjoa / DumbHandler.py
Last active October 5, 2018 08:03
Very simple python logging handler using print statements
from logging import Handler, getLevelName
import sys
class DumbHandler(Handler):
def __init__(self):
Handler.__init__(self)
def flush(self):