Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/perl
# Emacs starter for Emacs mac port
# Thanks to Aquamacs Project and David Reitter
my $args = "";
my $tmpfiles = "";
for my $f (@ARGV) {
#!/bin/sh
### BEGIN INIT INFO
# Provides: btsync
# Required-Start: $local_fs $remote_fs
# Required-Stop: $local_fs $remote_fs
# Should-Start: $network
# Should-Stop: $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Multi-user daemonized version of btsync.
@priyadarshan
priyadarshan / awk-expense-calculator.awk
Created August 11, 2014 14:06
Awk Expense Calculator, by Ward Cunningham
#!/usr/bin/awk -f
# Source: http://c2.com/doc/expense/
/^[A-Z]+[A-Z0-9]*$/ {
if (sums[$1] == "" || $1 == "SUM") {
sums[$1] = sum # Define Symbol
$1 = sum
sum = 0
}
;;;; Last modified : 2013-05-31 18:03:49 tkych
;; Usage:
;; (string-to-morse "Samuel")
;; => "... ._ __ .._ . ._.."
;; (morse-to-string "__ ___ ._. ... .")
;; => "MORSE"
;; (string-to-morse "Samuel Morse")
;; => error!! #\Space can't be converted into morse code.
:;exec emacs -batch -l "$0" -f nic-custom-self-install "$@"
;;; custom.el --- Nic's custom stuff for Emacs
;; Copyright (C) 2012 Nic Ferrier <nferrier@ferrier.me.uk>
;; Author: Nic Ferrier <nferrier@ferrier.me.uk>
;; Keywords: local
;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License
---
# ^^^ YAML documents must begin with the document separator "---"
#
#### Example docblock, I like to put a descriptive comment at the top of my
#### playbooks.
#
# Overview: Playbook to bootstrap a new host for configuration management.
# Applies to: production
# Description:
# Ensures that a host is configured for management with Ansible.
---
# ^^^ YAML documents must begin with the document separator "---"
#
#### Example docblock, I like to put a descriptive comment at the top of my
#### playbooks.
#
# Overview: Playbook to bootstrap a new host for configuration management.
# Applies to: production
# Description:
# Ensures that a host is configured for management with Ansible.
---
# ^^^ YAML documents must begin with the document separator "---"
#
#### Example docblock, I like to put a descriptive comment at the top of my
#### playbooks.
#
# Overview: Playbook to bootstrap a new host for configuration management.
# Applies to: production
# Description:
# Ensures that a host is configured for management with Ansible.
@priyadarshan
priyadarshan / zfs
Last active August 29, 2015 14:07 — forked from kiela/zfs
[root@rescue ~]# gpart destroy -F ada0
ada0 destroyed
[root@rescue ~]# gpart destroy -F ada1
ada1 destroyed
[root@rescue ~]# gpart create -s gpt ada0
ada0 created
[root@rescue ~]# gpart create -s gpt ada1
ada1 created
[root@rescue ~]# gpart add -s 128 -t freebsd-boot ada0
ada0p1 added
Arc doesn't cause the expired link issue. Arc is just a Lisp that lets
you program however you want. The HN software is written in a style
that uses closures to remember what a user is up to across multiple
web requests. I'll describe a classic example of this, then how we
changed it a few months ago. While there are still some expired link
errors--primarily when we restart the server process--there are vastly
fewer than there were.
When you click "More" at the bottom of a page, HN shows you the next
30 stories. These are different for logged-in users--they're affected