Skip to content

Instantly share code, notes, and snippets.

💭
I'm a broken fence in the yard of annoyance.

whitequark whitequark

💭
I'm a broken fence in the yard of annoyance.
Block or report user

Report or block whitequark

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View ldap.in
# -*- mode: sh; sh-basic-offset: 3; indent-tabs-mode: nil; -*-
# vim: set filetype=sh sw=3 sts=3 expandtab autoindent:
#
# openldap backup handler script for backupninja
#
getconf backupdir /var/backups/ldap
getconf suffixes all
getconf compress yes
getconf ldif yes
View Mayakovskell
> f :: (); f = (); main = print $ f 3
An expression
in your code
has an error
in `main = foo 3':
You apply
`foo`,
a function,
View gist:9992624
Message from syslogd@raidho at Apr 5 15:47:52 ...
kernel:[313653.582307] Uhhuh. NMI received for unknown reason 30 on CPU 0.
kernel:[313653.582314] Do you have a strange power saving mode enabled?
kernel:[313653.582316] Dazed and confused, but trying to continue
View pathname.ml
(* Derived from code by: Barbara Lepage <db0company@gmail.com>,
originally found at: https://github.com/db0company/Pathname,
and licensed under Apache 2.0. *)
(** Type of pathnames: [real, lst, str]. [real] indicates whether the path
is absolute. [lst] contains path components in reverse order. [str]
contains string representation of path. *)
type t = (bool * string list * string)
let sep =
@whitequark
whitequark / fix-xcompose-sublime-text-3061.gdb
Last active Aug 29, 2015
Makes XCompose work in 64-bit Sublime Text build 3061 on Linux!
View fix-xcompose-sublime-text-3061.gdb
# Run as: $ GTK_IM_MODULE=xim gdb -script fix-xcompose-sublime-text-3061.gdb
file /opt/sublime_text/sublime_text
set follow-fork-mode child
set detach-on-fork off
run
inferior 2
set follow-fork-mode parent
set detach-on-fork on
b *0x5b3267
c
View .xsession
#!/bin/bash
export PATH=/sbin:/usr/sbin:$PATH:~/.bin:/usr/local/bin
# For Skype to recognize desktop themes
QT_PLUGIN_PATH=${QT_PLUGIN_PATH+$QT_PLUGIN_PATH:}`kde4-config --path qtplugins`
export QT_PLUGIN_PATH
if test -z "$XDG_DATA_DIRS"; then
XDG_DATA_DIRS="`kde4-config --prefix`/share:/usr/share:/usr/local/share"
View gist:5920a7bc84b3d5731006
Do not insert devices in the wrong orientation or incorrectly.
Make sure that the positive and negative terminals of power supplies are connected properly.
Otherwise, the current or power consumption may exceed the absolute maximum rating, and
exceeding the rating(s) may cause the device breakdown, damage or deterioration, and may
result injury by explosion or combustion.
In addition, do not use any device that is applied the current with inserting in the wrong
orientation or incorrectly even just one time.
@whitequark
whitequark / install.sh
Last active Aug 29, 2015
install lz4 from source
View install.sh
#!/bin/sh -ex
V=r119
curl -OJL https://github.com/Cyan4973/lz4/archive/${V}.tar.gz
tar -zxvf lz4-${V}.tar.gz
cd lz4-${V}
make
sudo make install
@whitequark
whitequark / install.sh
Last active Aug 29, 2015
install mupdf from source
View install.sh
#!/bin/sh -ex
sudo apt-get install libjbig2dec0-dev libjpeg8-dev libfreetype6-dev libopenjpeg-dev zlib1g-dev libmupdf-dev libv8-dev libssl-dev
MUPDFREV=eebc338
curl -L "http://git.ghostscript.com/?p=mupdf.git;a=snapshot;h=${MUPDFREV};sf=tgz" -o mupdf-${MUPDFREV}.tgz
curl -LO "https://gist.github.com/whitequark/57aacfd4c7428f979ba9/raw/f8d6077285d3458a7cabb5e2e0e06c494b30179b/use_openjpeg_1.5.patch"
tar xf mupdf-${MUPDFREV}.tgz
cd mupdf-${MUPDFREV}
patch -p1 <../use_openjpeg_1.5.patch
View gist:5b1735797a81267fed31
> (Nokogiri::HTML.parse(File.read('bookmarks_7_25_14.html'))/"a").map {|x| x['href']}.grep(/z0r.de/) # Chrome, Y U NO MAKE Ctrl-C WORK
=> ["http://z0r.de/15",
"http://z0r.de/204",
"http://z0r.de/149",
"http://z0r.de/2061",
"http://z0r.de/2140",
"http://z0r.de/16",
"http://z0r.de/1623",
"http://z0r.de/1672",
"http://z0r.de/1606",
You can’t perform that action at this time.