Skip to content

Instantly share code, notes, and snippets.

@aziem
aziem / build-latex-zip.sh
Created February 15, 2018 13:44
Shell script to build a zip for a LaTeX repo with dependencies calculated by latexmk
#!/bin/bash
# Script to build a zip file suitable for paper submission
# need to have latexmk installed:
# (On Linux): apt-get install latexmk
# (On OSX): brew install latexmk OR bundled with the TeX distribution
# (On Windows): latexmk is bundled with MikTeX distribution
@aziem
aziem / loader.conf
Last active August 29, 2015 14:06 — forked from maxrp/rc.conf
# even if you aren't using ELI, this is a good module to load for SSL, etc.
aesni_load="YES"
# WiFi
iwn6050fw_load="YES"
iwnfw_load="YES"
if_iwn_load="YES"
legal.intel_iwn.license_ack=1
# Enable power saving modes for the Intel i915 chipset
;; -*- lexical-binding: t -*-
(require 'cl-lib)
(require 'dbus)
(cl-flet (( udisks-register-signal (&rest args)
(apply 'dbus-register-signal
:system "org.freedesktop.UDisks"
"/org/freedesktop/UDisks"
"org.freedesktop.UDisks"
args))
@aziem
aziem / Emacs Spotify D-Bus
Created October 8, 2013 21:31
Basic elisp to control Spotify
(defun spotify-play () "Play Spotify" (interactive)
(shell-command "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Play"))
(defun spotify-pause () "Pause Spotify" (interactive)
(shell-command "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Pause"))
(defun spotify-playpause () "Play/Pause Spotify" (interactive)
(shell-command "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause"))
(defun spotify-next () "Next song in Spotify" (interactive)
@aziem
aziem / gist:1239692
Created September 24, 2011 18:46 — forked from keeran/gist:1197453
# Block Facebook
127.0.0.1 www.facebook.com
127.0.0.1 facebook.com
127.0.0.1 static.ak.fbcdn.net
127.0.0.1 www.static.ak.fbcdn.net
127.0.0.1 login.facebook.com
127.0.0.1 www.login.facebook.com
127.0.0.1 fbcdn.net
127.0.0.1 www.fbcdn.net
127.0.0.1 fbcdn.com