Skip to content

Instantly share code, notes, and snippets.

@henix
henix / bri.sh
Created April 19, 2013 11:25
bri: show, set and store the brightness of your laptop (BTW, check the battery)
#!/bin/bash
BRIFILE=/sys/class/backlight/acpi_video0/brightness
if [ $# -lt 1 ]; then
cat $BRIFILE
else
echo $1 > $BRIFILE
echo $1 > /root/.bri
fi
@henix
henix / jillus-intro.md
Last active December 15, 2015 00:49
jillus - A type-safe parser combinator in Java

先放代码:https://github.com/henix/jillus

什么是 Parsing

  • 把序列化的数据变成你自己的数据结构(参见:三大 DSL
  • 处理的数据结构通常带递归

如何描述语法,或:带递归的数据结构

  • EBNF - 请参见编译教科书
@henix
henix / zathurarc
Created February 3, 2013 06:05
zathura: View pdf in custom bg color
set default-bg "#C7EDCC"
set recolor true
set recolor-lightcolor "#C7EDCC"
set recolor-darkcolor "#000000"
@henix
henix / shBrushTcl.js
Created June 1, 2012 11:46
SyntaxHighlighter brush for Tcl
/**
* SyntaxHighlighter brush for Tcl
*
* more info:
* http://blog.henix.info/blog/tcl-syntaxhighlighter-brush.html
*
* @version 0.3
*
* @copyright
* Copyright (C) 2011-2012 henix.