Skip to content

Instantly share code, notes, and snippets.

View argv0's full-sized avatar

Andy Gross argv0

View GitHub Profile
(defun insert-ascii-dong (size)
(interactive "nSize: ")
(insert (concat "8" (make-string size ?=) "D")))
#ifndef LRU_CACHE_HPP_
#define LRU_CACHE_HPP_
#include <cstddef>
#include <ctime>
#include <map>
#include <list>
#include <vector>
#include <stdint.h>
#include <vector>
#include <erl_driver.h>
#include <ei.h>
#include "lru_item.hpp"
#include "lru_cache.hpp"
typedef std::vector<char> char_vec;
typedef lru_cache<char_vec, item_t> cache_t;
typedef enum _request_type {
I have this inside a shell script: emacsclient -e "(and (find-file \"$1\") (org-export-as-html .. http://bit.ly/7BCNjV (http://twitter.com/jazzpecq/status/7573531542)
http://orgmode.org/worg/org-faq.php#preserving-faces-during-batch-export might give you a start. HTH #org-mode #emacs (http://twitter.com/carstendominik/statuses/7556595312)
you could do something up with "-f" (function) cmd-line arg, e.g. "emacs -b -f org-export-latex filename" haven't tried it, though. (http://twitter.com/haxney/statuses/7537627042)
Also, http://www.blogofile.com/ allows posts to be written in org-mode and rendered as HTML when you build/serve the site. (vid @dreid)
-module(ripple_fsm_sup).
-behaviour(supervisor).
-export([start_link/0]).
-export([init/1]).
-export([start_fsm/1]).
-export([stop/1]).
start_fsm(get) ->
-module(session_deref).
-compile(export_all).
run() ->
{ok, FP} = file:open("/tmp/session_mapping.txt", [write]),
{ok, R} = riak_ring_manager:get_my_ring(),
VNodes = riak_ring:my_indices(R),
fold_vnodes(VNodes, FP).
fold_vnodes([], FP) ->
#ifndef RIAK_OBJECT_HPP_
#define RIAK_OBJECT_HPP_
#include <string>
#include <vector>
#include <map>
#include "vclock.hpp"
typedef std::map<std::string, std::string> metadata_map_t;
#!/usr/bin/python
import threading
import uuid
import sys, os, getopt, time, random
sys.path.append("./lib")
from riak_pbc import RiakPbcClient
from riak import RiakClient as RiakHTTPClient
#include <string.h>
#include <string>
#include "riakserver_pb_nifs.h"
#include "riakserver.pb.h"
template <class T>
ERL_NIF_TERM pb_obj_to_binary(ErlNifEnv *env, const T& obj) {
ErlNifBinary res;
enif_alloc_binary(env, obj.ByteSize(), &res);
obj.SerializeToArray(res.data, res.size);
100408 11:01:55 InnoDB: Error creating file 'data/innodb/innokeystore/sessions_285449538541191976211657193889899027276549324800.ibd'.
100408 11:01:55 InnoDB: Operating system error number 17 in a file operation.
InnoDB: Error number 17 means 'File exists'.
InnoDB: Check InnoDB website for details
InnoDB: The file already exists though the corresponding table did not
InnoDB: exist in the InnoDB data dictionary. Have you moved InnoDB
InnoDB: .ibd files around without using the SQL commands
InnoDB: DISCARD TABLESPACE and IMPORT TABLESPACE, or did
InnoDB: the server crash in the middle of CREATE TABLE? You can
InnoDB: resolve the problem by removing the file 'data/innodb/innokeystore/sessions_285449538541191976211657193889899027276549324800.ibd'