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
lsof -i:3000 | tail -1 | awk '{ print $2 }' | xargs kill |
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
aaaa |
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
aaaaaa |
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
app.service 'timeoutIfLast', [ | |
'$q' | |
'$interval' | |
($q, $interval) -> | |
# delayの間, watchFnがtrueのまま持続したときに実行されるpromiseを返す | |
# | |
# @param {Function} watchFn | |
# @param {Number} delay ms | |
# @param {Number} [watchInterval] ms | |
# @return {Promise} |
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 c | |
Loading development environment (Rails 4.1.0) | |
irb(main):001:0> 1.month.ago + 1.month + 1.day | |
=> Thu, 01 May 2014 06:25:34 UTC +00:00 | |
irb(main):002:0> 1.month.ago + 1.day + 1.month | |
=> Wed, 30 Apr 2014 06:25:47 UTC +00:00 |
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
# localStorageで状態を保存・同期するやつ | |
# | |
# example: | |
# State.set('key', 'value') | |
# State.on('key', (changedValue) -> | |
# update(changedValue) | |
# ) | |
angular.module('state') | |
.service 'State', [ | |
'localStorageService' |
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
DragData = | |
set: (event, data) -> | |
transfer = event.originalEvent.dataTransfer | |
transfer.setData('text/drag-data', JSON.stringify(data)) | |
get: (event) -> | |
data = event.originalEvent.dataTransfer.getData('text/drag-data') | |
try |
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>Gyazo</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>/Users/zat/bin/gyazo-key.rb</string> | |
</array> |
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"?> | |
<root> | |
<vkopenurldef> | |
<name>KeyCode::VK_OPEN_URL_GYAZO</name> | |
<url type="file">/Applications/Gyazo.app</url> | |
</vkopenurldef> | |
<list> | |
<item> | |
<name>Private</name> |
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
Verifying that +uiu is my openname (Bitcoin username). https://onename.com/uiu |