Skip to content

Instantly share code, notes, and snippets.

@sathlan
sathlan / *scratch*.el
Created January 9, 2013 07:34
skeleton for a basic blog exporter.
; use org-make-options-regexp to catch BLOG_DIR in #+BLOG_DIR that can
; be overload in a property :BLOG_DIR:. Same mechanism for
; BLOG_AUTHOR, BLOG_MAIL, BLOG_CATEGORY, BLOG_TAG. For this tag,
; BLOG_TAG, we can have multiple values.
(defun ch:org-export-blog ()
(let* ((tree (org-copy-subtree))
(buf (generate-new-buffer "*testing export*"))
(blog_dir "/tmp")
(blog_author "")
@sathlan
sathlan / titi.org
Created January 9, 2013 13:43
test file for blog export.

Test for blog rendering

I try this

@sathlan
sathlan / ruby.org
Created January 17, 2013 18:47
eigenclass example.

module Greeter class Configurator OPTIONS = { :name => ‘toto’, :verbose => false, }

class << self OPTIONS.each do |name, default| define_method(name) do

@sathlan
sathlan / *scratch*.el
Created January 22, 2013 00:15
Inspiration for ag.el improvement.
; can be used to improve matching of ag.el. See also:
; - grep-mode-map
; - define-compilation-mode where everything happens
(defun grep-filter ()
"Handle match highlighting escape sequences inserted by the grep process.
This function is called from `compilation-filter-hook'."
(save-excursion
(forward-line 0)
(let ((end (point)) beg)
https://plus.google.com/hangouts/_/080efb0c1c7c2d7faba03fc708c5463a76d535ad
https://plus.google.com/hangouts/_/29afb86a5e5f65a4e532fc386948e02c9026db59?authuser=0&hl=fr
https://plus.google.com/hangouts/_/a6663d1791fa29929c87431da1a4786dd1e006fe?authuser=0&hl=en
@sathlan
sathlan / make_usb.sh
Created April 8, 2013 13:38
create a multiboot freebsd/linux usb key.
#!/bin/sh -x
START_DIR=$CWD
SHARE_DIR=/backup001/chem/home/chem/src/mfsbsd
KEYBOARD=dvorak
WANT_PHORONIX_TEST_SUITE=4.4.1 # set it to no to disable
# catch error from my own error function even in subshell.
err_handler ()
{
rc=$?
@sathlan
sathlan / add-jail.sh
Created April 8, 2013 13:39
modification to mfsbsd zfsinstall to take into account ssd alignment.
#!/usr/bin/env sh
IP_PREFIX='10.11.12'
help () {
cat<<EOF
USAGE: $0 [-h] -i LAST_BLOCK_IP -m CIDR -v VLAN -n NAME
DESCRIPTION:
@sathlan
sathlan / gist:7076682
Created October 20, 2013 23:38
add-jail.sh
We couldn’t find that file to show.