This file contains hidden or 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
(when (eq system-type 'darwin) | |
(defvar my-set-xattr-utf-8-modes '(text-mode org-mode ruby-mode js2-mode css-mode)) | |
(defun my-set-xattr-if-utf-8() | |
(when (and (memq major-mode my-set-xattr-utf-8-modes) | |
(string-match "^utf-8" (prin1-to-string buffer-file-coding-system))) | |
(call-process "xattr" nil 0 nil "-w" "com.apple.TextEncoding" "UTF-8;134217984" buffer-file-name))) | |
(add-hook 'after-save-hook 'my-set-xattr-if-utf-8)) |
This file contains hidden or 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
def daemon_monitoring(w, options = {}) | |
# ... | |
w.start_if do |start| | |
start.condition(:process_running) do |c| | |
c.interval = 30.seconds | |
c.running = false | |
c.notify = 'ymorimo' | |
end | |
end | |
# ... |
This file contains hidden or 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
RAILS_ROOT = File.dirname(File.dirname(__FILE__)) | |
RAILS_ENV = ENV['RAILS_ENV'] || 'production' | |
def daemon_monitoring(w, options = {}) | |
w.interval = 30.seconds | |
w.start = "#{options[:script]} start" | |
w.restart = "#{options[:script]} restart" | |
w.stop = "#{options[:script]} stop" | |
w.grace = 30.seconds |
This file contains hidden or 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
RAILS_ROOT = File.dirname(File.dirname(__FILE__)) | |
RAILS_ENV = ENV['RAILS_ENV'] || 'production' | |
God.watch do |w| | |
script = "env RAILS_ENV=#{RAILS_ENV} #{RAILS_ROOT}/script/daemons/scheduler" | |
w.name = "scheduler" | |
w.group = "example_app" | |
w.pid_file = "#{RAILS_ROOT}/log/scheduler_daemon.pid" | |
w.interval = 30.seconds |
This file contains hidden or 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
Daemons.run_proc('twitter_streaming_daemon', | |
:dir_mode => :normal, | |
:dir => File.join(APP_DIR, 'log'), | |
:multiple => false, | |
:backtrace => true, | |
:monitor => false, | |
:log_output => true | |
) do | |
EventMachine::run do |
This file contains hidden or 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
--- src/nsterm.m 2010-03-29 23:48:44 +0000 | |
+++ src/nsterm.m 2010-05-14 09:56:22 +0000 | |
@@ -4471,8 +4471,15 @@ | |
? MULTIBYTE_CHAR_KEYSTROKE_EVENT : ASCII_KEYSTROKE_EVENT; | |
emacs_event->code = code; | |
- EV_TRAILER (theEvent); | |
- return; | |
+ | |
+ /* HACK: pass shift+ascii to input manager */ |
This file contains hidden or 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
(add-hook 'find-file-hook | |
(lambda() | |
(if (string-match "/Dropbox/" buffer-file-name) | |
(set (make-variable-buffer-local 'make-backup-files) nil)))) |
This file contains hidden or 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
// ==UserScript== | |
// @name jnb_branch_001 | |
// @namespace http://github.com/ymorimo | |
// @description Autofill JNB's branch number 001 on its login form | |
// @include https://www.japannetbank.co.jp/login.html | |
// ==/UserScript== | |
window.addEventListener('load', function() { | |
document.forms.wrappedJSObject.HOST.TenNo.value = '001'; | |
}, false); |
NewerOlder