git diff base..feature
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
# bash profile for Debian/Ubuntu/CentOS | |
# color prompt | |
PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' | |
# alias | |
alias ll='ls -lhap --color=auto' | |
alias ls='ls -p --color=auto' | |
alias grep='grep --color=auto' |
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
function XDecimal(seed){ | |
var SEED = seed.split(""); | |
var SEED_LENGTH = SEED.length; | |
function toString(value) { | |
if(value % 1 != 0){ | |
var p = value.toString().split("."); | |
return toString(p[0]) + "." + toString(p[1]); | |
} | |
var v = value; |
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
import android.content.Context; | |
import android.os.Handler; | |
import android.os.Looper; | |
import java.util.TimerTask; | |
/** | |
* UIスレッドに安全にアクセスできるTimerTaskです | |
* | |
* @author kob-to |
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
import android.app.Service; | |
import android.content.Intent; | |
import android.os.Handler; | |
import android.os.IBinder; | |
import android.support.annotation.Nullable; | |
import android.support.annotation.RequiresPermission; | |
import android.util.Log; | |
import java.io.IOException; | |
import java.net.DatagramPacket; |
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
'use strict'; | |
const Http = require('http'); | |
const Request = require('request'); | |
const LISTEN_ADDRESS = '127.0.0.1'; | |
const LISTEN_PORT = 9090; | |
const REQUEST_TIMEOUT = 1000; | |
const URL_PREFIX = '/webhook'; | |
const PROXY = ''; |
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
function postSlack(botname, boticon, channel, message) { | |
var u = PropertiesService.getScriptProperties().getProperty('SLACK_WEBHOOK_URL'); | |
var p = { 'text': message }; | |
if (botname) { | |
p.username = botname; | |
} | |
if (/^:[^:]+:$/.test(boticon)) { | |
p.icon_emoji = boticon; | |
} else if (/^https?:\/\//.test(boticon)) { | |
p.icon_url = boticon; |
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
// フラグ付きでなく、未読でなく、自分宛てでない、180日より前のメールを削除する | |
function deleteOldMails() { | |
var m = GmailApp.search('-label:starred -label:unread -to:me older_than:180d'); | |
for (var i = 0; i < m.length; i++) { | |
m[i].moveToTrash(); | |
}; | |
} |
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
#!/bin/bash | |
VSCODE=/Applications/Visual\ Studio\ Code.app/Contents/Resources/app/bin/code | |
scanrepo () { | |
p=$@ | |
if [ -d "$p" ]; then | |
pushd $p > /dev/null | |
else | |
exit -1 | |
fi |