Skip to content

Instantly share code, notes, and snippets.

Index: SConstruct
===================================================================
--- SConstruct (revision 3521)
+++ SConstruct (working copy)
@@ -47,7 +47,7 @@
# on linux we need these compiler flags to avoid crashes in the v8 test suite
# and avoid dtoa.c strict aliasing issues
if os.environ.get('GCC_VERSION') == '44':
- GCC_EXTRA_CCFLAGS = ['-fno-tree-vrp']
+ GCC_EXTRA_CCFLAGS = ['-fno-tree-vrp', '-fno-strict-aliasing']
@fredrik
fredrik / list.c
Created October 18, 2011 14:21
List files in directory. Works on directories with many millions of files.
/*
* based on example code in the getdents(2) man page.
* informed by http://www.olark.com/spw/2011/08/you-can-list-a-directory-with-8-million-files-but-not-with-ls/
*/
#define _GNU_SOURCE
#include <dirent.h> /* Defines DT_* constants */
#include <fcntl.h>
#include <stdio.h>
@fredrik
fredrik / Makefile.diff
Created July 24, 2012 10:37
librabbitmq 0.9.9 install fails
diff --git a/Makefile b/Makefile
index 7c5ccf8..527c238 100644
--- a/Makefile
+++ b/Makefile
@@ -57,7 +57,7 @@ $(RABBIT_TARGET):
dist: rabbitmq-c $(RABBIT_TARGET)
-
+ (cd clib; test -f clib/config.h || ./configure)
@fredrik
fredrik / ssh config
Created April 22, 2013 10:38
Re-use network connections for quicker ssh.
Host *
ControlMaster auto
ControlPath ~/.ssh/auth/%r@%h:%p
ControlPersist yes
@fredrik
fredrik / gist:6166061
Created August 6, 2013 16:23
POST yaml with curl
curl -X POST --data-binary @payload.yaml -H "Content-type: text/x-yaml" http://localhost:4200/some-url/1024
@fredrik
fredrik / Hetzner-EX6S
Last active December 22, 2015 06:09 — forked from cmer/gist:1566734
Hetzner EX6S (Intel Xeon E3-1245 Quadcore, 32GB RAM, ..)
=> http://www.hetzner.de/en/hosting/produkte_rootserver/ex6s
========================================================================
BYTE UNIX Benchmarks (Version 5.1.3)
System: wtfbbq: GNU/Linux
OS: GNU/Linux -- 3.8.0-29-generic -- #42~precise1-Ubuntu SMP Wed Aug 14 16:19:23 UTC 2013
Machine: x86_64 (x86_64)
Language: en_US.utf8 (charmap="UTF-8", collate="UTF-8")
@fredrik
fredrik / linode basic
Last active December 22, 2015 06:18 — forked from cmer/gist:1566734
digital ocean basic ~2.2GHz 512MB RAM
========================================================================
BYTE UNIX Benchmarks (Version 5.1.3)
System: bark: GNU/Linux
OS: GNU/Linux -- 3.2.0-23-virtual -- #36-Ubuntu SMP Tue Apr 10 22:29:03 UTC 2012
Machine: x86_64 (x86_64)
Language: en_US.utf8 (charmap="UTF-8", collate="UTF-8")
CPU 0: QEMU Virtual CPU version 1.0 (4600.0 bogomips)
x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
@fredrik
fredrik / linode
Last active December 22, 2015 06:19 — forked from cmer/gist:1566734
(old) linode four cores 512MB RAM
========================================================================
BYTE UNIX Benchmarks (Version 5.1.3)
System: fakedew.net: GNU/Linux
OS: GNU/Linux -- 2.6.32.16-linode28 -- #1 SMP Sun Jul 25 21:32:42 UTC 2010
Machine: i686 (unknown)
Language: en_US.utf8 (charmap="UTF-8", collate="UTF-8")
CPU 0: Intel(R) Xeon(R) CPU L5520 @ 2.27GHz (4533.5 bogomips)
Hyper-Threading, MMX, Physical Address Ext
@fredrik
fredrik / Preferences.sublime-settings
Last active December 22, 2015 20:39
sublime text 2 settings
{
"auto_complete": false,
"color_scheme": "Packages/User/Tomorrow-Night.tmTheme",
"copy_with_empty_selection": false,
"dictionary": "Packages/Language - English/en_GB.dic",
"draw_white_space": "all",
"font_size": 20.0,
"highlight_line": true,
"hot_exit": false,
"ignored_packages":
import itertools
import random
from string import ascii_lowercase as alphabet
vowels = ['a', 'e', 'i', 'o', 'u', 'y']
consonants = list(set(alphabet) - set(vowels))
def random_pronouncable_string(length):