Skip to content

Instantly share code, notes, and snippets.

View antifuchs's full-sized avatar
🕴️

Andreas Fuchs antifuchs

🕴️
View GitHub Profile
@antifuchs
antifuchs / gist:829781
Created February 16, 2011 17:36
Hack&slash configure script fix for building openmotif on OS X
--- a/configure 2010-03-12 06:44:09.000000000 -0800
+++ b/configure 2011-02-16 09:21:39.000000000 -0800
@@ -19482,7 +19482,7 @@
saved_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $FREETYPE_CFLAGS"
-for ac_header in freetype/freetype.h
+for ac_header in ft2build.h
do
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
@antifuchs
antifuchs / color-theme-solarized.el
Created April 2, 2011 23:11 — forked from sellout/color-theme-solarized.el
color-theme-solarized for emacs, with additional definitions for show-paren-mode and org-mode todo/done states
(eval-when-compile
(require 'color-theme))
(defun color-theme-solarized (mode)
"Color theme by Ethan Schoonover, created 2011-03-24.
Ported to Emacs by Greg Pfeil, http://ethanschoonover.com/solarized."
(interactive "Slight or dark? ")
(let ((base03 "#002b36")
(base02 "#073642")
(base01 "#586e75")
@antifuchs
antifuchs / ack-project.el
Created May 10, 2011 21:37
full-ack extension: Ack for current word at point
(defun ack-project (prefix)
"Ack for current word at point from the project root (uses full-ack).
With prefix argument, search only files of the same type."
(interactive "p")
(require 'full-ack)
(if prefix
(ack-run (ack-guess-project-root) nil (current-word))
(ack-run (ack-guess-project-root) nil (append (ack-type) (list (current-word))))))
@antifuchs
antifuchs / gist:1265774
Created October 5, 2011 21:19
tmux failure
$ strace -f /usr/local/stow/tmux/bin/tmux
execve("/usr/local/stow/tmux/bin/tmux", ["/usr/local/stow/tmux/bin/tmux"], [/* 28 vars */]) = 0
brk(0) = 0x2c7f000
uname({sys="Linux", node="seedbox.boinkor.net", ...}) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ac75a5f2000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/home/asf/lib/tls/x86_64/libutil.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/home/asf/lib/tls/x86_64", 0x7fff59254990) = -1 ENOENT (No such file or directory)
open("/home/asf/lib/tls/libutil.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
static VALUE
rb_str_each_line(int argc, VALUE *argv, VALUE str)
{
rb_encoding *enc;
VALUE rs;
unsigned int newline;
const char *p, *pend, *s, *ptr;
long len, rslen;
VALUE line;
int n;
@antifuchs
antifuchs / gist:1887380
Created February 22, 2012 21:20 — forked from boucher/gist:1750368
Stripe sample checkout form
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title>Stripe Sample Form</title>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.3/jquery.min.js"></script>
<script type="text/javascript" src="https://ajax.aspnetcdn.com/ajax/jquery.validate/1.8.1/jquery.validate.min.js"></script>
<script type="text/javascript" src="https://js.stripe.com/v1/"></script>
<script type="text/javascript">
@antifuchs
antifuchs / StripeTutorialPage.html
Created February 22, 2012 21:26 — forked from boucher/StripeTutorialPage.html
Stripe Tutorial Payment Form
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title>Stripe Getting Started Form</title>
<script type="text/javascript" src="https://js.stripe.com/v1/"></script>
<!-- jQuery is used only for this example; it isn't required to use Stripe -->
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.3/jquery.min.js"></script>
<script type="text/javascript">
// this identifies your website in the createToken call below
@antifuchs
antifuchs / mkpassphrase.rb
Created September 8, 2012 23:11
Passphrase generation script
#!/usr/bin/env ruby
require 'optparse'
def exp_notation(n)
Math.log10(n).floor
end
def main
options = {}
"Beware of bugs in the above code; I have only proved it correct, not
tried it."
- Donald Knuth
@antifuchs
antifuchs / gist:5155064
Last active December 14, 2015 21:59 — forked from jbalogh/gist:5155003
Fix header color for streams/channels
.message_list {
background-color: transparent !important;
}
.recipient_row {
border: none !important;
}
.recipient_row .left_part {
background-color: transparent !important;
}