% Title % Name % Date
List
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| import subprocess | |
| import tempfile | |
| import requests | |
| import argparse | |
| import textwrap | |
| import sys | |
| [Desktop Entry] | |
| Version=1.0 | |
| Name=org-protocol helper | |
| Comment=helper to allow GNOME to open org-protocol: pseudo-urls | |
| TryExec=/usr/bin/emacsclient | |
| Exec=/usr/bin/emacsclient %u | |
| NoDisplay=true | |
| Icon=emacs24 | |
| Terminal=false | |
| Type=Application |
| function git_clean_branches | |
| set base_branch develop | |
| # work from our base branch | |
| git checkout $base_branch | |
| # remove local tracking branches where the remote branch is gone | |
| git fetch -p | |
| # find all local branches that have been merged into the base branch |
| all: json2bson | |
| clean: | |
| rm -f json2bson | |
| json2bson: json2bson.c | |
| ${CC} $(shell pkg-config --cflags json libmongo-client glib-2.0) -Wall -O0 -ggdb3 -std=c99 ${CFLAGS} \ | |
| $(shell pkg-config --libs json libmongo-client glib-2.0) -o $@ $^ | |
| check: all | |
| ./json2bson <test.json >test.bson |
| import exifread | |
| # based on https://gist.github.com/erans/983821 | |
| def _get_if_exist(data, key): | |
| if key in data: | |
| return data[key] | |
| return None |
| gdisk /dev/sda # make 1 partition | |
| mkfs.vfat -n BOOT /dev/sda1 | |
| mkfs.btrfs -L root /dev/sdb | |
| mkfs.btrfs -L docker /dev/sdc | |
| mount -t btrfs -o noatime,discard,ssd,autodefrag,compress=lzo,space_cache /dev/sdb /mnt/ | |
| btrfs subvolume create /mnt/nixos | |
| umount /mnt/ | |
| mount -t btrfs -o noatime,discard,ssd,autodefrag,compress=lzo,space_cache,subvol=nixos /dev/sdb /mnt/ |
| #!/usr/bin/env ruby | |
| # - encoding: utf-8 - | |
| # | |
| # E.g. with: pinget.rb https://feeds.pinboard.in/rss/secret:YOURSECRET/u:YOURUSERNAME/toread/ | |
| require 'rss' | |
| require 'open-uri' | |
| require 'uri' | |
| WGET = ['wget', |
| SLIDES := $(patsubst %.md,%.md.slides.pdf,$(wildcard *.md)) | |
| HANDOUTS := $(patsubst %.md,%.md.handout.pdf,$(wildcard *.md)) | |
| all : $(SLIDES) $(HANDOUTS) | |
| %.md.slides.pdf : %.md | |
| pandoc $^ -t beamer --slide-level 2 -o $@ | |
| %.md.handout.pdf : %.md | |
| pandoc $^ -t beamer --slide-level 2 -V handout -o $@ |
| bootstrap-tooltip.js | |
| bootstrap-popover.js | |
| bootstrap-alert.js | |
| bootstrap-button.js | |
| bootstrap-carousel.js | |
| bootstrap-collapse.js | |
| bootstrap-dropdown.js | |
| bootstrap-modal.js | |
| bootstrap-scrollspy.js | |
| bootstrap-tab.js |