Skip to content

Instantly share code, notes, and snippets.

View kanru's full-sized avatar

Kan-Ru Chen kanru

View GitHub Profile
@kanru
kanru / bugzilla.gs
Created February 7, 2017 11:04 — forked from wolph/bugzilla.gs
Bugzilla fetcher for google sheets
/**
* @fileoverview Provides the custom function BUGZILLA_TITLE and
* the helper functions that it uses.
*/
/**
* Runs when the add-on is installed.
*/
function onInstall() {
onOpen();
#!/bin/sh
set -x
DBUS_NAME="org.freedesktop.login1"
DBUS_PATH="/org/freedesktop/login1"
DBUS_INTERFACE="org.freedesktop.login1.Manager"
DBUS_SIGNAL="PrepareForSleep"
INHIBITOR_PID=
install_background_inhibitor() {
(defun eshell-last-argument (n)
(let* ((input (substring-no-properties
(eshell-previous-input-string (1- n))))
(parse (with-temp-buffer
(insert input)
(car (reverse (eshell-parse-arguments
(point-min) (point-max)))))))
(eval parse)))
(defun eshell-insert-last-word (n)
@kanru
kanru / sudoku-test.lisp
Created March 4, 2012 15:51 — forked from hanshuebner/sudoku-test.lisp
Ruby book Sudoku solver in Common Lisp
(defmacro deftestpackage (package-name for-package &optional (test-library-package-name :unit-test))
"Define a new package PACKAGE-NAME used to test the package
designated by FOR-PACKAGE. The new package will import all symbols
from FOR-PACKAGE and :USE the package designated by
TEST-LIBRARY-PACKAGE-NAME which supposedly contains unit testing
functions and macros."
`(defpackage ,package-name
(:use ,test-library-package-name ,@(mapcar #'package-name (package-use-list for-package)))
(:import-from ,for-package
,@(let (symbols)
@kanru
kanru / karma 100
Created February 8, 2010 07:47 — forked from c9s/gist:297919
#karma{color:rgba(0,0,0,0);background:url(http://omploader.org/vM2hoeQ/karma_hack.png) no-repeat;}