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
// inspired from: | |
// https://gist.github.com/masuidrive/0bea937bcaf12bc94e7fba8acf13382a | |
// ## Go to https://api.slack.com/ | |
// * Create your app. | |
// * Create "Bot User". | |
// * Go to "OAuth Tokens & Redirect URLs" and copy the Access Token. | |
// * Set the permission of "chat:write:bot" to the bot. | |
// ## Go to https://www.google.com/script/start/ |
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 my/action-lock-search-hashtag (hashtag) | |
(howm-search hashtag t)) | |
(setq action-lock-default-rules | |
(cons (action-lock-general 'my/action-lock-search-hashtag "^#[^ #]+$" 0) | |
action-lock-default-rules)) |
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 memo-create() | |
(interactive) | |
(let ((memo-name (format-time-string "%Y-%m-%d-%s"))) | |
(find-file (concat "~/Dropbox/memo/" memo-name ".md")))) | |
(defun memo-search() | |
(interactive) | |
(setq q (read-string "grep word: ")) | |
(ag-regexp q "~/Dropbox/memo/") | |
(select-window ; select ag buffer | |
(car (my/get-buffer-window-list-regexp "^\\*ag ")))) |
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
def inline_dl(line) | |
dl = "" | |
dl << "<dl>" | |
line.scan(/\[.+?\][^\[]+/).each do |item| | |
dt, dd = item.scan /[^\[\]]+/ | |
dl << "<dt>#{dt}</dt>" | |
dl << "<dd>#{dd}</dd>" | |
end | |
dl << "</dl>" | |
dl |
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
/Users/xxx/.nodebrew/node/v5.8.0/lib/node_modules/textlint/lib/task/textlint-core-task.js:13 | |
f (typeof superClass !== "function" && superClass !== null) { throw new TypeEr | |
^ | |
TypeError: Super expression must either be null or a function, not object | |
at _inherits (/Users/kdmsnr/.nodebrew/node/v5.8.0/lib/node_modules/textlint/lib/task/textlint-core-task.js:13:113) | |
at /Users/kdmsnr/.nodebrew/node/v5.8.0/lib/node_modules/textlint/lib/task/textlint-core-task.js:38:5 | |
at Object.<anonymous> (/Users/kdmsnr/.nodebrew/node/v5.8.0/lib/node_modules/textlint/lib/task/textlint-core-task.js:160:3) | |
at Module._compile (module.js:456:26) | |
at Object.Module._extensions..js (module.js:474:10) | |
at Module.load (module.js:356:32) |
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 Kernel | |
def using(resource) | |
begin | |
yield | |
ensure | |
resource.dispose | |
end | |
end | |
def using2(resource) |
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
# -*- coding: utf-8 -*- | |
ReVIEW::Compiler.defblock :tsv, 0..2, true | |
module ReVIEW | |
class Builder | |
# //tsv[ファイル名][キャプション] | |
def tsv(lines, id, caption = nil) | |
lines = File.open(id) | |
table(lines, id, caption) | |
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
checking for GCC... -------------------- yes | |
"/usr/bin/gcc-4.2 -o conftest -I/Users/kdmsnr/.rbenv/versions/1.9.3-p0/include/ruby-1.9.1/x86_64-darwin11.2.0 -I/Users/kdmsnr/.rbenv/versions/1.9.3-p0/include/ruby-1.9.1/ruby/backward -I/Users/kdmsnr/.rbenv/versions/1.9.3-p0/include/ruby-1.9.1 -I. -I'/Users/kdmsnr/.rbenv/versions/1.9.3-p0/include' -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -I'/Users/kdmsnr/.rbenv/versions/1.9.3-p0/include' -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wshorten-64-to-32 -Wimplicit-function-declaration -pipe conftest.c -L. -L/Users/kdmsnr/.rbenv/versions/1.9.3-p0/lib -L. -L'/Users/kdmsnr/.rbenv/versions/1.9.3-p0/lib' -L/usr/local/lib -lruby-static -lpthread -ldl -lobjc " | |
checked program was: | |
/* begin */ | |
1: #include "ruby.h" | |
2: | |
3: int main() {return 0;} | |
/* 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
diff --git a/plugin/00default.rb b/plugin/00default.rb | |
index d52ee62..c04a912 100644 | |
--- a/plugin/00default.rb | |
+++ b/plugin/00default.rb | |
@@ -447,7 +447,7 @@ end | |
# make anchor string | |
# | |
def anchor( s ) | |
- if /^([\-\d]+)#?([pct]\d*)?$/ =~ s then | |
+ if /^([\-_\d]+)#?([pct]\d*)?$/ =~ s then |