Skip to content

Instantly share code, notes, and snippets.

View rudeb0t's full-sized avatar

Nimrod Abing rudeb0t

  • The Republic of the Philippines
View GitHub Profile
c++ -O3 -Wall -shared -std=c++11 -fPIC `python -m pybind11 --includes` example.cpp -o _example`python-config --extension-suffix`
@rudeb0t
rudeb0t / ubuntu-is-balls.sh
Created May 20, 2015 12:44
Ubuntu is balls: Command line to remove old kernels after upgrading and rebooting
#!/bin/bash
dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d' | xargs sudo apt-get -y purge
@rudeb0t
rudeb0t / gist:3191848
Created July 28, 2012 04:52
Fix ropemode.vim after upgrading to OS X Mountain Lion
" Put this into your ~/.vim/plugins/ as ropemode.vim
" replacing the file if it is already there.
" This fixes loading ropemode after you have installed
" it system-wide. For some reason, the sys.prefix for the
" Python embedded into vim is differently configured from
" the one on system Python.
"
function! LoadRope()
python << EOF
import site