Skip to content

Instantly share code, notes, and snippets.

@jbulow
jbulow / getemacs.sh
Created November 24, 2011 20:35
full screen emacs 24 on osx snow leopard/lion
# Git Emacs 24 from the main Savannah (savannah.gnu.org) repository and apply typester's fullscreen patch
rm -fr emacs
git clone git://git.savannah.gnu.org/emacs.git
cd emacs
wget http://cloud.github.com/downloads/typester/emacs/feature-fullscreen.patch
patch -p1 -i feature-fullscreen.patch
cd ..
curl -O http://ftp.gnu.org/gnu/m4/m4-1.4.13.tar.gz
tar -xzvf m4-1.4.13.tar.gz
cd m4-1.4.13
@jbulow
jbulow / tlc.lua
Created March 28, 2012 15:32 — forked from fjolnir/tlc.lua
LuaJIT ObjC bridge
-- TLC - The Tiny Lua Cocoa bridge
-- Note: Only tested with LuaJit 2 Beta 9 on x86_64 with OS X >=10.7.3 & iPhone 4 with iOS 5
-- Copyright (c) 2012, Fjölnir Ásgeirsson
-- Permission to use, copy, modify, and/or distribute this software for any
-- purpose with or without fee is hereby granted, provided that the above
-- copyright notice and this permission notice appear in all copies.
-- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.syntax meta
arg = '$' <'emit_token();'>
| .string <'emit(' $ ');'>;
output = '<' *arg '>' <'emit_nl();'>;
exp3 = .id <'meta_' $ '();'>
| .string <'read_literal(' $ ');'>
| '.id' <'read_id();'>
#!/bin/bash
# Author: Damien Cassou
#
# This is the script I use to build https://launchpad.net/~cassou/+archive/emacs/
# from http://emacs.naquadah.org/.
MAIN_VERSION=20121202
SUB_VERSION=1
# Download & install marports http://www.macports.org/install.php
$ sudo port selfupdate
$ sudo port install nginx
$ sudo launchctl load -w /Library/LaunchDaemons/org.macports.nginx.plist
$ sudo port install php5 +fastcgi fcgi
$ sudo mkdir /opt/local/etc/LaunchDaemons/org.macports.php-fastcgi
$ cd /opt/local/etc/LaunchDaemons/org.macports.php-fastcgi
$ mate org.macports.php-fastcgi.plist # or vim org.macports.php-fastcgi.plist
{
/* Keybindings for emacs emulation. Compiled by Jacob Rus.
*
* To use: copy this file to ~/Library/KeyBindings/
* after that any Cocoa applications you launch will inherit these bindings
*
* This is a pretty good set, especially considering that many emacs bindings
* such as C-o, C-a, C-e, C-k, C-y, C-v, C-f, C-b, C-p, C-n, C-t, and
* perhaps a few more, are already built into the system.
*
@jbulow
jbulow / blocks.cc
Last active August 29, 2015 14:20 — forked from xlz/blocks.cc
// g++ -std=c++11 -O3 blocks.cc -o blocks
#include <iostream>
#include <vector>
#include <bitset>
#include <queue>
#include <unordered_map>
#include <algorithm>
#include <cstdint>
#include <sstream>
#include <string>
@jbulow
jbulow / build-emacs.sh
Created November 4, 2015 09:24 — forked from favadi/build-emacs.sh
Compile latest emacs version (24.5) in Ubuntu 14.04
#!/bin/bash
# Build latest version of Emacs, version management with stow
# OS: Ubuntu 14.04 LTS
# version: 24.5
# Toolkit: lucid
set -e
readonly version="24.5"
@jbulow
jbulow / crypto-wrong-answers.md
Created November 18, 2015 10:36 — forked from paragonie-scott/crypto-wrong-answers.md
An Open Letter to Developers Everywhere (About Cryptography)
@jbulow
jbulow / Makefile
Created December 7, 2015 12:19 — forked from willglynn/Makefile
Ragel for classifying log lines
line_classifier: line_classifier.o
%.c: %.rl
ragel -G2 $^ -o $@