Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env bash
# Put followings your .tmux.conf
#
# bind ^T run-shell tmux-ghq
#
set -e
fzfcmd="fzf-tmux -d${FZF_TMUX_HEIGHT:-40%} -e +s"
;;; Commentary
;; Select and activate google chrome tabs by anything interface
;;; Requirements
;; https://github.com/mechairoi/crxel
;;; Usage
;; (require 'anything-chrome-tabs)
;; (crxel/start 9649)
;; (define-key global-map "C-t" 'anything-chrome-tabs)
(provide 'anything-chrome-tabs)
(provide 'google-eldoc)
(require 'eldoc)
(require 'crxel)
(defun google-eldoc-turn-on-eldoc-mode ()
"Enable google-eldoc-mode"
(interactive)
(set (make-local-variable 'eldoc-documentation-function)
'google-eldoc-search-current-symbol-info)
(turn-on-eldoc-mode))
(require 'vc-git)
(require 'anything)
(provide 'anything-git-ls-files)
(defun anything-git-ls-files-find-git-root ()
(vc-git-root (or (buffer-file-name) default-directory)))
(defun anything-c-source-git-ls-files-for (name command)
`((name . ,name)
(init
@mechairoi
mechairoi / gist:3848591
Created October 7, 2012 14:55
Xslate segmentation fault
use Text::Xslate;
my $tx = Text::Xslate->new({
syntax => 'TTerse',
});
print $tx->render('a.tt');
print $tx->render('a.tt');
__END__
;;; perldb-ui-ex.el --- Extended User Interface for perl debugger
;; Copyright (C) 2011 Free Software Foundation, Inc.
;;
;; Author: Tsujikawa Takaya <ttsujikawa@gmail.com>
;; Maintainer: Tsujikawa Takaya <ttsujikawa@gmail.com>
;; Created: 25 Nov 2011
;; Version: 0.01
;; Keywords:
define dump_emacs_bt
set $t = backtrace_list
while $t
print *(struct Lisp_String *)(((struct Lisp_Symbol *)(*($t->function)-2))->xname -1)
set $t = $t->next
end
end
document dump_emacs_bt
dumps the current frame stack. usage: dump_emacs_bt
--
-- Toggle AirPort.scpt
--
-- Author: Andrew Heiss - http://www.andrewheiss.com
-- Project site: http://github.com/andrewheiss/AirPort-Toggle
-- Description: Toggle AirPort.scpt is a simple AppleScript file that will
-- either enable or disable your AirPort connection
-- License: Licensed under the MIT License (see README for full information)
-- Date: November 4, 2009
-- Version: 1.0
#!/usr/bin/env perl
use List::Util qw(first);
while(1){
if (first { /\Q100.0% packet loss\E/ } `ping -W 1 -c 3 192.168.0.1`) {
`osascript ~/config/bin/toggle-air-mac.scpt`;
`osascript ~/config/bin/toggle-air-mac.scpt`;
}
sleep(10);
}
#!/usr/bin/env perl
use List::Util qw(first);
while(1){
if (first { /\Q100.0% packet loss\E/ } `ping -W 1 -c 3 192.168.0.1`) {
`osascript ~/config/bin/toggle-air-mac.scpt`;
`osascript ~/config/bin/toggle-air-mac.scpt`;
}
sleep(10);
}