This file contains 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
;; search char | |
;; http://dev.ariel-networks.com/wp/documents/aritcles/emacs/part16 | |
;; List3 | |
(defvar last-search-char nil) | |
(defvar last-search-direction 'forward) | |
(defun search-forward-with-char (char) | |
(interactive "cMove to Char: ") | |
(if (eq (char-after (point)) char) (forward-char)) | |
(and (search-forward (char-to-string char) nil t) |
This file contains 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
@namespace url(http://www.w3.org/1999/xhtml); | |
@-moz-document | |
url-prefix("https://twitter.com") { | |
div.dashboard { | |
display: none; | |
} | |
div.content-main { | |
width: 650px !important; |
This file contains 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
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use WWW::Mechanize; | |
my $email = shift; | |
my $password = shift; |
This file contains 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
var next = require("path/to/next"); | |
function first(callbacks, params) { | |
asyncProcess(function(res) { | |
params.first = res; | |
next(callbacks, params); | |
}); | |
} | |
function second(callbacks, params) { |
This file contains 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
module.exports = function(callbacks, args) { | |
if (0 < callbacks.length) { | |
callbacks.shift()(callbacks, args); | |
} | |
}; |
This file contains 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
var http = require("http"); | |
http.get({ | |
host: "example.com", | |
port: 80, | |
path: "/" | |
}, function(res) { | |
var text = ""; | |
res.setEncoding("utf8"); |
This file contains 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
var array = [ | |
1, | |
2, | |
[10, 11, 12], | |
[20, 21, [30, 31]], | |
3 | |
]; | |
console.log('before'); | |
console.log(array); |
This file contains 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
(defun string-width-in-region (start end) | |
(interactive "r") | |
(princ (string-width (buffer-substring start end)))) |
This file contains 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
(defun ktai-hankaku-katakana-region (start end) | |
(interactive "r") | |
(while (string-match | |
"[0-9A-Za-zァ-ンー:;$]+\\|[!?][!?]+" | |
(buffer-substring start end)) | |
(save-excursion | |
(japanese-hankaku-region | |
(+ start (match-beginning 0)) | |
(+ start (match-end 0)) | |
)))) |