Skip to content

Instantly share code, notes, and snippets.

@theirix
theirix / test.log
Created August 27, 2016 14:46
xelatex failure log
This is XeTeX, Version 3.14159265-2.6-0.99996 (TeX Live 2016/Debian) (preloaded format=xelatex 2016.8.26) 27 AUG 2016 14:42
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
**test
(./test.tex
LaTeX2e <2016/03/31> patch level 3
Babel <3.9r> and hyphenation patterns for 83 language(s) loaded.
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
@theirix
theirix / test.tex
Created August 27, 2016 14:45
xelatex failure MWE
\documentclass{article}
% this:
\usepackage{unicode-math}
\usepackage[english]{babel}
\begin{document}
\title{Test}
\author{Foo}
@theirix
theirix / test.log
Created August 27, 2016 14:43
xelatex failure log
This is XeTeX, Version 3.14159265-2.6-0.99996 (TeX Live 2016/Debian) (preloaded format=xelatex)
restricted \write18 enabled.
entering extended mode
(./test.tex
LaTeX2e <2016/03/31> patch level 3
Babel <3.9r> and hyphenation patterns for 83 language(s) loaded.
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo))
(/usr/share/texlive/texmf-dist/tex/latex/unicode-math/unicode-math.sty
@theirix
theirix / FixedGZIPInputStream.java
Created August 15, 2016 16:21
GZIPInputStream for Android without 2 GiB limitation
import android.support.annotation.NonNull;
import java.io.FilterInputStream;
import java.io.IOException;
import java.util.zip.GZIPInputStream;
/**
* GZIPInputStream that works correctly with files more than 2 GiB
* <p/>
* <p><b>Rationale</b>
@theirix
theirix / foo.cpp
Created July 26, 2016 10:53
Libasan failure on devtoolset-3
// test with:
// scl enable devtoolset-3 -- g++ -std=c++11 -g -O0 -fsanitize=address -static-libasan foo.cpp
#pragma pack(1)
struct TestStruct
{
};
#include <regex>
@theirix
theirix / gitcleanup.sh
Created March 3, 2016 17:10
Clean a git working copy
#!/bin/bash
if [ -d "$1" ] ; then
cd "$1"
fi
git gc -q
git repack -q -a -d --depth=250 --window=250
git prune
digraph test {
compound = true;
remincross = true;
subgraph cluster_g{
"node_g" [shape=point style=invis];
G;
};
subgraph cluster_h{
@theirix
theirix / poll-iron-maiden.rb
Created May 17, 2013 18:31
Checks does a wonderful Iron Maiden song hit a 666'666 scrobble count
#!/usr/bin/env ruby
require 'net/http'
require 'json'
url = "http://ws.audioscrobbler.com/2.0/?method=track.getInfo&api_key=644aa4f87f12b4e2904cd495366cc6b5&" +
"artist=Iron+Maiden&track=Seventh+Son+Of+A+Seventh+Son&format=json"
puts JSON(Net::HTTP.get(URI.parse(url)))['track']['playcount']
@theirix
theirix / gist:5577672
Created May 14, 2013 17:10
bash minimal color
export GNU_COLORS='di=1;34:ln=36:so=33:pi=33:ex=32:bd=33:cd=33;40:su=32;41:sg=34;41:tw=1;34;42:ow=1;31;42:or=36;41:'
export PS1="$(if [[ ${EUID} == 0 ]]; then echo '\[\033[01;31m\]\h'; else echo '\[\033[01;32m\]\u@\h'; fi)\[\033[01;34m\] \w \$([[ \$? != 0 ]] && echo \"\[\033[01;31m\]:(\[\033[01;34m\] \")\\$\[\033[00m\] "
alias ls="ls --color=auto"
alias grep="grep --color=auto"
@theirix
theirix / patch-zz-vncaddress.patch
Created December 12, 2012 20:04
Patch for emulators/virtualbox-ose (4.1.22) on FreeBSD. Allows to specify a listen port for a VNC server.
--- src/VBox/Frontends/VBoxHeadless/VBoxHeadless.cpp.orig 2012-12-12 23:26:55.241729935 +0400
+++ src/VBox/Frontends/VBoxHeadless/VBoxHeadless.cpp 2012-12-12 23:23:46.365727984 +0400
@@ -476,6 +476,7 @@
#ifdef VBOX_WITH_VNC
" -n, --vnc Enable the built in VNC server\n"
" -m, --vncport <port> TCP port number to use for the VNC server\n"
+ " -q, --vncaddress <ipaddr> IP address or host name to use for the VNC server\n"
" -o, --vncpass <pw> Set the VNC server password\n"
#endif
" -v, -vrde, --vrde on|off|config Enable (default) or disable the VRDE\n"