This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- a/LuaExtension.cxx 2010-07-21 01:03:41.000000000 +0200 | |
+++ b/LuaExtension.cxx 2010-08-21 20:29:55.332214899 +0200 | |
@@ -722,7 +722,9 @@ | |
if (L) { | |
int traceback = 0; | |
if (tracebackEnabled) { | |
- lua_getglobal(L, "print"); | |
+ lua_getglobal(L, "debug"); | |
+ lua_getfield(L, -1, "traceback"); | |
+ lua_remove(L, -2); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/lua | |
require 'lfs' | |
-- Path to where packages are located | |
REPO = 'packages' | |
-- List of packages (e.g. loaded from dist manifest) | |
PACKAGES = { | |
p1 = true, p2 = true, p3 = true, | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ... | |
function parse_git_branch { | |
ref=$(git symbolic-ref HEAD 2> /dev/null) || return | |
echo -e " \e[0;33m"\(${ref#refs/heads/}\) | |
} | |
if [ "$color_prompt" = yes ]; then | |
PS1="\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\$(parse_git_branch)\[\033[00m\]\$ " | |
else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- A simple module to read ID3 tags from MP3 files. | |
-- Supports ID3v1 tags and a (meaningful) subset of ID3v2 tags. | |
-- @class module | |
-- @name id3 | |
-- @author Michal Kottman | |
-- @copyright 2011, released under MIT license | |
local id3 = {} | |
local function textFrame(name) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Apple Multitouch MacBook trackpad in Lua using LuaJIT FFI, 2011 Michal Kottman | |
-- definitions from http://www.steike.com/code/multitouch/ | |
local ffi = require 'ffi' | |
ffi.cdef [[ | |
typedef struct { float x,y; } mtPoint; | |
typedef struct { mtPoint pos,vel; } mtReadout; | |
typedef struct { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# A two-line colored Bash prompt (PS1) with Git branch and a line decoration | |
# which adjusts automatically to the width of the terminal. | |
# Recognizes and shows Git, SVN and Fossil branch/revision. | |
# Screenshot: http://img194.imageshack.us/img194/2154/twolineprompt.png | |
# Michal Kottman, 2012 | |
RESET="\[\033[0m\]" | |
RED="\[\033[0;31m\]" | |
GREEN="\[\033[01;32m\]" | |
BLUE="\[\033[01;34m\]" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## | |
## ca-bundle.crt -- Bundle of CA Root Certificates | |
## | |
## Certificate data from Mozilla as of: Sat Dec 29 20:03:40 2012 | |
## | |
## This is a bundle of X.509 certificates of public Certificate Authorities | |
## (CA). These were automatically extracted from Mozilla's root certificates | |
## file (certdata.txt). This file can be found in the mozilla source tree: | |
## http://mxr.mozilla.org/mozilla/source/security/nss/lib/ckfw/builtins/certdata.txt?raw=1 | |
## |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
figlist | awk '/fonts/ {f=1;next} /control/ {f=0} f {print}' | while read font; do | |
echo "=== $font ===" | |
echo $font | figlet -f $font | |
done | less |