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
{ | |
"東京": { | |
"where": "東京", | |
"geo": { | |
"latitude": 35.681085, | |
"longitude": 139.76672 | |
}, | |
"observation": { | |
"rain": 0, | |
"date": "2016-01-20T17:20:00.000Z" |
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
/* | |
* https://dev.twitter.com/rest/reference/get/search/tweets | |
* https://github.com/desmondmorris/node-twitter/tree/master/examples#search | |
*/ | |
"use strict"; | |
require("dotenv").load(); | |
import _ from "lodash"; |
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
// フィボナッチ数列をどんどん生成してprintする | |
"use strict"; | |
var fibGenerator = regeneratorRuntime.mark(function fibGenerator() { | |
var fibs; | |
return regeneratorRuntime.wrap(function fibGenerator$(_context) { | |
while (1) { | |
switch (_context.prev = _context.next) { | |
case 0: |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>hue-korg-control</string> | |
<key>UserName</key> | |
<string>sho</string> | |
<key>WorkingDirectory</key> | |
<string>/Users/sho/src/node/hue-korg-control</string> |
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
# Description: | |
# notify "reaction_added" event for slack.com | |
# http://shokai.org/blog/archives/10344 | |
# | |
# Author: | |
# @shokai <hashimoto@shokai.org> | |
debug = require('debug')('hubot:slack-reaction') | |
_ = require 'lodash' |
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
function iterm-bg-image-random(){ | |
zle accept-line | |
if [[ -z "$BUFFER" ]]; then | |
$(iterm-bg-image ~/Pictures/写真\ Library.photoslibrary -r > /dev/null 2>&1 &) | |
fi | |
} | |
zle -N iterm-bg-image-random | |
bindkey '^m' iterm-bg-image-random |
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
#!/usr/bin/osascript | |
on run argv | |
tell application "iTerm" | |
tell the current terminal | |
tell the current session | |
set background image path to item 1 of argv | |
end tell | |
end tell | |
end tell | |
end run |
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
source "https://rubygems.org" | |
gem "capybara-webkit" |
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
/lib/systemd/system/edison_config.service を参考にした | |
/lib/systemd/system/hue-korg-control.service に配置 | |
% systemctl enable hue-korg-control | |
% systemctl start hue-korg-control |
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
# http://www.softantenna.com/wp/software/5-programming-problems/ | |
# 1+2+34-5+67-8+9 == 100 のようなのを全て見つける | |
operators = ['+','-',''] | |
0.upto(operators.length**8-1).each do |i| | |
exp = 1.upto(9).map{|n| | |
n == 9 ? n : n.to_s + operators[(i%(operators.length**n))/(operators.length**(n-1))] | |
}.join() | |
puts "#{exp} == 100" if eval(exp) == 100 |