Skip to content

Instantly share code, notes, and snippets.

@mechairoi
mechairoi / gist:1039965
Created June 22, 2011 12:28
exuberant ctags patch mysql modoki
diff --git a/sql.c b/sql.c
index efe7e5d..b7e21f2 100644
--- a/sql.c
+++ b/sql.c
@@ -319,13 +319,13 @@ static boolean isIdentChar1 (const int c)
* identifier, so we are removing some restrictions.
*/
return (boolean)
- (isalpha (c) || c == '@' || c == '_' );
+ (isalpha (c) || c == '@' || c == '_' || c == '`' );
(require 'mo-git-blame)
(setq mo-git-blame-blame-window-width 80)
;; format of blame
(defun mo-git-blame-process-filter-process-entry (entry)
(with-current-buffer (plist-get mo-git-blame-vars :blame-buffer)
(save-excursion
(let ((inhibit-read-only t)
(info (format "%s (%-8s %s %s) %s"
(substring (symbol-name (plist-get entry :hash)) 0 8)
(let ((author (plist-get entry :author))) (substring author 0 (min 8 (length author))))
#!/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);
}
--
-- 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
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
;;; 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:
@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__
(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
;;; 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)