Skip to content

Instantly share code, notes, and snippets.

@osteslag
osteslag / version.sh
Created July 18, 2011 12:45
Script for managing build and version numbers using git and agvtool. See link in comments below.
#!/bin/sh
# Script for managing build and version numbers using git and agvtool.
# Change log:
# v1.0 18-Jul-11 First public release.
# v1.1 29-Sep-12 Launch git, agvtool via xcrun.
version() {
@areina
areina / emacs-email-setup.md
Created October 12, 2012 15:00
Manage your email in emacs with mu4e

Manage your gmail account in emacs with mu4e

There're a lot of combinations to manage your email with emacs, but this works for me. I've a backup and I can manage my daily email.

The stack:

  • emacs
  • offlineimap
  • mu
  • mu4e
@johnjohndoe
johnjohndoe / .gitignore
Created January 3, 2011 18:04
A git log alias with colors, date and owner.
# A git log alias.
# Shows the brief log describtion in one line.
# Adds colors, a relative date and the owner.
# File name: .gitconfig
[alias]
look = log --graph --pretty=format:'%Cred %h : %Creset%s %Cgreen(%cr) %C(blue)<%an>%C(yellow)%d %Creset' --date=relative
@christianparpart
christianparpart / monkeypatchor.cpp
Created May 24, 2012 18:06
Monkey-Patching in C/C++ :-)
// compile me: g++ -shared -fPIC -ldl -o monkeypatchor.so monkeypatchor.cpp
// use me: LD_PRELOAD=`pwd`/monkeypatchor.so /bin/ls
#include <dlfcn.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/mman.h>
void* (*malloc_super)(size_t);
void (*free_super)(void*);
@donny-dont
donny-dont / aligned_allocator.cpp
Created December 13, 2011 09:11
An aligned allocator for placing SIMD types in std::vector
#ifdef _WIN32
#include <malloc.h>
#endif
#include <cstdint>
#include <vector>
#include <iostream>
/**
* Allocator for aligned data.
@alexott
alexott / minimial-cedet-config.el
Created October 22, 2012 07:30
Working configuration for CEDET from bzr & GNU Emacs (with working C++ & Java name completion)
;;; minimial-cedet-config.el --- Working configuration for CEDET from bzr
;; Copyright (C) Alex Ott
;;
;; Author: Alex Ott <alexott@gmail.com>
;; Keywords: cedet, C++, Java
;; Requirements: CEDET from bzr (http://cedet.sourceforge.net/bzr-repo.shtml)
;; Do checkout of fresh CEDET, and use this config (don't forget to change path below)
@takumikinjo
takumikinjo / .gitignore
Created August 5, 2010 13:56
HTML5 Presentation export for Org-mode
README.html
@joshski
joshski / flame.lua
Created April 21, 2013 10:52
Generates a little flame. Works in Codea.
-- a little flame in a functional style
function particle(step, style, t)
local newStyle = step(style, t)
return {
style = newStyle,
next = function()
return particle(step, newStyle, t + 1)
end
}
@cooldaemon
cooldaemon / Makefile
Created May 5, 2009 06:51
libxml2 sax sample.
xml2_sax_sample: xml2_sax_sample.c
gcc -o xml2_sax_sample `xml2-config --cflags --libs` xml2_sax_sample.c
clean:
rm xml2_sax_sample
@VictorLaskin
VictorLaskin / NamedTuple.h
Last active April 14, 2023 18:56
Named tuple for C++
// Named tuple for C++
// Example code from http://vitiy.info/
// Written by Victor Laskin (victor.laskin@gmail.com)
// Parts of code were taken from: https://gist.github.com/Manu343726/081512c43814d098fe4b
namespace foonathan {
namespace string_id {
namespace detail
{