Skip to content

Instantly share code, notes, and snippets.

@afh
afh / tmux_italic.md
Created November 30, 2019 19:23 — forked from gyribeiro/tmux_italic.md
enable italic font on tmux
Moved to https://docs.google.com/document/d/17KfV_c0DI6ZSMQiBfYylxqt0VU8XAvjHQsyNh0tDK3I/edit#heading=h.sudttarnig9w
#!/bin/sh
led_status='/sys/class/leds/chip:white:status'
trigger=''
case $1 in
on) trigger='default-on' ;;
off) trigger='none' ;;
beat) trigger='heartbeat' ;;
charge) trigger='axp20x-usb-online' ;;
blink) trigger='timer'
@afh
afh / ledger_boost_159.patch
Created September 15, 2015 13:40
Patch to workaround compile issues when using boost 1.59
diff --git a/src/system.hh.in b/src/system.hh.in
index 8de27ad..c6654cb 100644
--- a/src/system.hh.in
+++ b/src/system.hh.in
@@ -253,6 +253,17 @@ typedef std::ostream::pos_type ostream_pos_type;
#include <boost/iterator/indirect_iterator.hpp>
+#if BOOST_VERSION == 105900
+// Fix for https://github.com/boostorg/python/issues/39
@afh
afh / sample_estimate.ledger
Created April 24, 2015 08:25
Project estimates using ledger
--decimal-comma
--time-colon
--sort=date
C 1d = 8h
D € 00.000,00
define rate=€70
define discount=0%
define vat=19%
@afh
afh / gist:a0927debfe89c0491afe
Last active August 29, 2015 14:12
nix ledger build
fetching path ‘/nix/store/aa8184zja11630nayzgdpjyc4skmlz7c-expat-2.1.0’...
*** Downloading ‘http://zalora-public-nix-cache.s3-website-ap-southeast-1.amazonaws.com/aa8184zja11630nayzgdpjyc4skmlz7c.nar’ to ‘/nix/store/aa8184zja11630nayzgdpjyc4skmlz7c-expat-2.1.0’...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (7) Failed to connect to zalora-public-nix-cache.s3-website-ap-southeast-1.amazonaws.com port 80: Connection refused
/nix/store/ni1rbgsw9jv5iijj1igwp423j7vr30v7-xz-5.0.7/bin/xz: (stdin): File format not recognized
error: unexpected end-of-file
download of ‘http://zalora-public-nix-cache.s3-website-ap-southeast-1.amazonaws.com/aa8184zja11630nayzgdpjyc4skmlz7c.nar’ failed: No such file or directory
could not download ‘/nix/store/aa8184zja11630nayzgdpjyc4skmlz7c-expat-2.1.0’ from any binary cache
# -*- coding: utf-8 -*-
import unittest
from ledger import *
class JournalTestCase(unittest.TestCase):
def _tearDown(self):
pass # session.close_journal_files()
diff --git a/src/filters.cc b/src/filters.cc
index bdc2983..d24188f 100644
--- a/src/filters.cc
+++ b/src/filters.cc
@@ -983,7 +983,7 @@ void interval_posts::flush()
sort_posts_by_date());
// Determine the beginning interval by using the earliest post
- if (all_posts.front() &&
+ if (all_posts.size() > 0 && all_posts.front() &&

Installing and configuring dwm on OS X (tested on Mountain Lion, Mavericks)

  1. Install XQuartz.

  2. Install dwm using Homebrew (or whatever):

    brew install dwm
    
  3. Create a xinitrc.d script for dwm:

Keybase proof

I hereby claim:

  • I am afh on github.
  • I am afh (https://keybase.io/afh) on keybase.
  • I have a public key whose fingerprint is CCAC 8ADA 2562 CE48 DC72 09AA 6961 00B8 8C22 DD8B

To claim this, I am signing this object: