Skip to content

Instantly share code, notes, and snippets.

public class DateUtils {
public static void main(String[] args) {
DateUtils dateUtils = new DateUtils();
// テストコード
int[] year_month_null = dateUtils.parseYearMonth(null);
if(year_month_null == null)
@tigawa
tigawa / gist:96afd45c8d2c96d86459
Last active August 29, 2015 14:14
netstat mac
lsof -nP -iTCP -sTCP:LISTEN
@tigawa
tigawa / gist:3a4899e3b837a8f3baf2
Last active August 29, 2015 14:13
JQueryでbutton, linkを無効にする方法
<html>
<head>
<meta charset="UTF-8">
<script type="text/javascript" src="http://code.jquery.com/jquery-2.1.1.min.js"></script>
<script type="text/javascript" src="http://fgnass.github.io/spin.js/spin.min.js"></script>
<script type="text/javascript" src="http://fgnass.github.io/spin.js/jquery.spin.js"></script>
<script type="text/javascript">
/* 共通処理 START*/
$(document).on('click', '.submit', function(evnet){
var opts = {
import UIKit
import WebKit
class ViewController: UIViewController{
var webview : WKWebView?
override func viewDidLoad() {
super.viewDidLoad()
// デバイスのCGRectを取得
var deviceBound : CGRect = UIScreen.mainScreen().bounds
@tigawa
tigawa / gist:61963215142c50c32e77
Created September 12, 2014 04:01
git 既にコミットしたファイルを除外する方法
echo foo.txt > .gitignore
git rm --cached foo.txt
git commit -m "foo.txtを除外"
@tigawa
tigawa / gist:a9813a3fdffcfa95c17b
Created September 12, 2014 03:57
git add 取り消し
git reset HEAD foo.txt
@tigawa
tigawa / gist:74568295d36cf01a1a8f
Created September 10, 2014 16:35
heroku 環境変数設定
heroku config:add PASSWORD="hero+haiku"
@tigawa
tigawa / gist:f5b2332479c6f3f8c7e6
Created September 10, 2014 16:32
heroku サブディレクトリをデプロイする。
#heroku workerディレクトリ配下をデプロイする。
git subtree push --prefix worker/ heroku master
※masterブランチ以外のブランチでもこのコマンドでいけた。
@tigawa
tigawa / gist:012b4720eda3885d91b4
Created September 10, 2014 16:29
heroku woker起動
#ProcfileをRoot直下に作成
worker: bundle exec ruby lib/eventmachine/twitter_stream.rb
#Herokuへデプロイ
heroku create test-app
git add -A
git commit -m "first commit."
git push heroku master
#workerプロセス起動
@tigawa
tigawa / gist:494fb0bb9a882aa7af8e
Created August 15, 2014 05:57
rails 空ページを返す方法
render :nothing => true