Skip to content

Instantly share code, notes, and snippets.

View sixtyfive's full-sized avatar
🐯
Rawrrr.

J. R. Schmid sixtyfive

🐯
Rawrrr.
View GitHub Profile
@sixtyfive
sixtyfive / gist:25676054582497032625
Created June 20, 2015 22:39
OpenWRT memory problem
jrs@DerGargoyle:/mnt$ date ; free ; dd if=/dev/zero of=file bs=1M count=20 ; free ; rm file ; free ; date
Sat Jun 20 23:42:02 CEST 2015
total used free shared buffers
Mem: 126416 45120 81296 0 5892
-/+ buffers: 39228 87188
Swap: 2097148 0 2097148
20+0 records in
20+0 records out
total used free shared buffers
Mem: 126416 65876 60540 0 5892
src/gz barrier_breaker_base http://downloads.openwrt.org/barrier_breaker/14.07/ar71xx/generic/packages/base
src/gz barrier_breaker_management http://downloads.openwrt.org/barrier_breaker/14.07/ar71xx/generic/packages/management
src/gz barrier_breaker_packages http://downloads.openwrt.org/barrier_breaker/14.07/ar71xx/generic/packages/packages
src/gz barrier_breaker_routing http://downloads.openwrt.org/barrier_breaker/14.07/ar71xx/generic/packages/routing
src/gz barrier_breaker_telephony http://downloads.openwrt.org/barrier_breaker/14.07/ar71xx/generic/packages/telephony
src/gz gargoyle http://www.gargoyle-router.com/packages/gargoyle-1.7.1/ar71xx/default
dest root /
dest ram /tmp
@sixtyfive
sixtyfive / mla13.sty
Last active August 29, 2015 14:23
Changed version of the mla13 LaTeX style for my needs
\ProvidesPackage{mla13}
\usepackage[a4paper]{geometry} % jrs: changed from letterpaper.
\usepackage[english,german]{babel} % jrs: changed from american.
\usepackage{csquotes}
\setlength{\parindent}{0.75cm} % jrs: changed from 0.5em
\usepackage[style=mla,mladraft=true,annotation=true,backend=biber]{biblatex}
\usepackage{color}
\newcommand{\sources}[1]{
\def\@sources{#1}
\bibliography{#1}
@sixtyfive
sixtyfive / test.tex
Created June 11, 2015 15:01
Long LaTeX table with Arabic in it causing an unwanted pagebreak before it.
%!TEX TS-program = xelatex
\documentclass{scrartcl}
\usepackage{booktabs}
\usepackage{setspace}
\onehalfspacing
\usepackage{arabxetex}
\usepackage{fontspec}
\newfontfamily\arabicfont[Script=Arabic,Scale=1.3]{Traditional Arabic}
\newcommand{\textar}[1]{\arabicfont\beginR{#1}\endR\rmfamily}
@sixtyfive
sixtyfive / rules.lua
Created June 9, 2015 10:23
My Devil's Pie 2 configuration in the hopes that it might one day help someone.
-- debug_print command only prints anything to stdout
-- if devilspie2 is run using the --debug option!
x,y,w,h = get_window_geometry()
xs,ys = get_screen_geometry()
debug_print("There are "..get_workspace_count().." workspaces with a total area of "..xs.."x"..ys..".")
debug_print("Window '"..get_window_name().."' ("..w.."x"..h..", belonging to '"..get_application_name().."') open(ed) at "..x.."x"..y..".")
-- Make sure windows open on the external monitor.
if (get_screen_geometry() > 1600 and x < (1600-w+50)) then
debug_print("Moving to viewport 2 because window's x=" .. x .. " < monitor border at 1600-w+50="..(w+50)..".")
@sixtyfive
sixtyfive / base.lst,evdev.lst
Last active August 29, 2015 14:21
DMG Variant of the German Keyboard Layout by the xkeyboard-config Project
[...]
dmg de: German (DMG)
[...]
[...]
dmg_om de: Arabisch (DMG mit omanischen Lauten)
[...]
@sixtyfive
sixtyfive / fix_permissions.sh
Created March 10, 2015 11:08
Black Magic Script taken from http://unix.stackexchange.com/questions/49959/how-to-restore-default-group-user-ownership-of-all-files-under-var, adapted for /usr and fixed (there was a typo in on of the sed commands). Be careful with this!
#! /bin/bash
perm_string_to_mode() {
string="$1"
let perms=0
[[ "${string}" = ?r???????? ]] && perms=$(( perms + 400 ))
[[ "${string}" = ??w??????? ]] && perms=$(( perms + 200 ))
[[ "${string}" = ???x?????? ]] && perms=$(( perms + 100 ))
[[ "${string}" = ???s?????? ]] && perms=$(( perms + 4100 ))
% $ biblatex auxiliary file $
% $ biblatex bbl format version 2.4 $
% Do not modify the above lines!
%
% This is an auxiliary file used by the 'biblatex' package.
% This file may safely be deleted. It will be recreated by
% biber as required.
%
\begingroup
\makeatletter
@misc{Website:AccentsInOman:2012,
author = "Tanhīda (nickname or possibly first name; no last name supplied)",
title = "Accents [sic] in Oman / Mušāhidat an-Nasḫa Kāmila",
date = "2012-08-22",
url = "http://www.dhofari.com/archive/index.php/t-188822.html"
},
@misc{Website:GulfArabicCrisis:2015,
author = "ʿAbd al-Ǧalīl Zayd al-Marhūn",
title = "ʾAzmat al-Luġa al-ʿArabiyya fī l-Ḫalīǧ",