Skip to content

Instantly share code, notes, and snippets.

@bperel
bperel / cleanup.sh
Last active January 21, 2017 11:45
Raspberry pi package cleanup
#!/bin/bash
sudo apt-get purge idle idle3 python3 python scratch libreoffice-* wolfram-engine minecraft-pi
rm -r ~/python_games
rm -rf ~/Documents/BlueJ Projects/ Documents/Greenfoot\ Projects/ Documents/Scratch\ Projects/
@bperel
bperel / index.html
Last active November 5, 2015 13:15
geotime-sankey
<!-- Copied from https://github.com/bperel/geotime-sankey/blob/master/index.html - Only the JS and CSS URLs are absolute-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
<style>
@import url(sankey.css);
</style>
<style>
@bperel
bperel / findSmallDirs.bash
Created October 24, 2015 13:46
Find directories smaller than 1M
#!/bin/bash
dir=/home/Downloads
du --max-depth=1 ${dir} -t -1000000 | cut -f 2 | sed -e 's/\(.*\)/"\1"/' | tr '\n' ' '
@bperel
bperel / chroot-mount.sh
Created July 16, 2015 13:41
chroot mount and unmount
mkdir server
mount /dev/sda2 server
mount /dev/sda1 server/boot
mount --bind /proc server/proc
mount --bind /sys server/sys
mount --bind /dev server/dev
mount --bind /lib server/lib/modules
@bperel
bperel / lifecycle
Last active August 29, 2015 14:16
Product life cycle
<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.1" width="800" height="600" viewBox="0 0 800 600" id="Layer_1" xml:space="preserve" style="
padding-left: 30px;
"><metadata id="metadata93"><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/></cc:Work></rdf:RDF></metadata><defs id="defs91"/><line fill="none" stroke="#000000" stroke-miterlimit="10" x1="5.611" y1="506.686" x2="733.46997" y2="506.686" id="line5" style="fill:none;stroke:#000000;stroke-miterlimit:10"/>
<line xmlns="http://www.w3.org/2000/svg" fill="none" stroke="#000000" stroke-miterlimit="10" x1="0.6" y1="34.844" x2="5.6" y2="29.844" id="line87" style="fill:none;stroke:#000000;stroke-miterlimit:10"/>
<line xmlns="http
@bperel
bperel / Map_of_Ancient_Rome_271_AD.svg
Last active August 29, 2015 14:12
Projection detection
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bperel
bperel / vmware_clear_cache.sh
Created August 4, 2014 15:37
Clear VMWare disk cache
#!/bin/bash
### BEGIN INIT INFO
# Provides: Handle caching page issues with vmware hgfs share
# Required-Start: $local_fs $network
# Required-Stop: $local_fs $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Handle caching page issues with vmware hgfs share
# Description: Handle caching page issues with vmware hgfs share
@bperel
bperel / German_Empire_1914.svg
Last active August 29, 2015 13:58
Superimposed maps
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bperel
bperel / gist:9915616
Created April 1, 2014 14:47
PhantomJs video capture
time ./phantomjs-1.9.7-linux-x86_64/bin/phantomjs test.js |ffmpeg -c:v png -f image2pipe -r 10 -i - -y test.mp4