Skip to content

Instantly share code, notes, and snippets.

@luozengbin
luozengbin / notify-send.sh
Created February 6, 2012 04:31 — forked from valvallow/notify-send.sh
notify-send for windows
#!/bin/sh
VALUE_ICON=`cygpath -d "$HOME/pict/terminal.png"`
VALUE_TITLE="terminal"
VALUE_MESSAGE="Ha!!"
while getopts hi:t:m: OPT
do
case $OPT in
@luozengbin
luozengbin / smartrep-viewer.el
Created January 30, 2012 23:12 — forked from ongaeshi/smartrep-viewer.el
smartrep.el を使って2つのバッファを同時にスクロール出来るViewer機能を作ってみた。
;;--------------------------------------------------------------------------
;; smartrep
;;--------------------------------------------------------------------------
(require 'smartrep)
;;--------------------------------------------------------------------------
;; smartrep viewer
;;--------------------------------------------------------------------------
; プレフィックスキーの設定
@luozengbin
luozengbin / battery.sh
Created November 21, 2011 02:26 — forked from valvallow/battery.sh
battery.sh
#!/bin/sh
current=`grep "remaining" /proc/acpi/battery/*/state | sed 's/[a-zA-Z: ]//g'`
total=`grep "design capacity:" /proc/acpi/battery/*/info | sed 's/[a-zA-Z: ]//g'`
rate=`grep "present rate:" /proc/acpi/battery/*/state | sed 's/[a-zA-Z: ]//g'`
charging=`grep "charging state:" /proc/acpi/battery/*/state | sed 's/[a-zA-Z ]*:[ ]*//g'`
if [ $rate -eq 0 ]; then
echo $charging
exit 0
@luozengbin
luozengbin / emacs.rb
Created October 30, 2011 04:26 — forked from uskanda/emacs.rb
Homebrew Emacs 23.3a for OSX Lion with native full-screen, inline patch
require 'formula'
class Emacs < Formula
url 'http://ftp.gnu.org/pub/gnu/emacs/emacs-23.3a.tar.bz2'
md5 'f2cf8dc6f28f8ae59bc695b4ddda339c'
homepage 'http://www.gnu.org/software/emacs/'
if ARGV.include? "--use-git-head"
head 'git://repo.or.cz/emacs.git'
else
@luozengbin
luozengbin / clipboard-to-kill-ring.el
Created October 5, 2011 15:04 — forked from tomykaira/clipboard-to-kill-ring.el
OS Xのクリップボードを定期的に監視してkill-ringに入れます
;;; clipboard-to-kill-ring.el
;;; * 概要
;;; OS Xのクリップボードを定期的に監視してkill-ringに入れます
;;; deferred.elが必要です
;;;
;;; * 使い方
;;; (clipboard-to-kill-ring t)
;;; で監視を始めます
;;; clipboard-to-kill-ring:interval を設定するとポーリングの間隔を変えられます.