Skip to content

Instantly share code, notes, and snippets.

View hagino3000's full-sized avatar

Takashi Nishibayashi hagino3000

View GitHub Profile
@aodag
aodag / instoru-paison
Created May 3, 2014 13:57
veriy simple python installer
#!/bin/sh
# -*- mode:sh -*-
version=$1
if [ "x$1" = "x" ] ; then
exit 1
fi
major=$(echo $version | awk -F "." '{print $1}')
minor=$(echo $version | awk -F "." '{print $2}')
micro=$(echo $version | awk -F "." '{print $3}')
@berzniz
berzniz / NSObject+Debounce.h
Created January 25, 2014 16:18
Debounce method for Objective C
@interface NSObject (Debounce)
- (void)debounce:(SEL)action delay:(NSTimeInterval)delay;
@end
@yuu-ito
yuu-ito / R_mvpart_package.md
Last active December 26, 2015 20:39
mvpart package サンプル

mvpart package サンプル

  • iris(あやめ)の大きな3枚のはなびらは,「Sepal がく片」
  • 小さな3枚のはなびらが,「Petal 花びら」である.
  • Sepal「がく片」の長さと幅・Petal「花びら」の長さと幅
  • Species「あやめ3品種 [setosa・versicolor・virginica]」
data(iris)
@voluntas
voluntas / django-s3-imagekit-celery.rst
Last active May 13, 2022 13:46
S3 と非同期サムネイル作成 コトハジメ

S3 と非同期サムネイル作成 コトハジメ

更新

2013-12-08

バージョン

0.1.8

作者

@voluntas

URL

http://voluntas.github.io/

概要

@KunihikoKido
KunihikoKido / objectcache.py
Created August 1, 2013 08:10
Django キャッシュサーバーへ、Python オブジェクトをキャッシュ
# -*- coding: utf-8 -*-
import hashlib
try:
import cPickle as pickle
except ImportError:
import pickle
class PythonObjectCache(object):
@classmethod
@esehara
esehara / simpleoptiontype.py
Created July 30, 2013 04:30
Option型のPython的実装
# -*- coding: utf-8 -*-
class SimpleOption(object):
NOTHING = False
SOME = True
def __init__(self, is_some, value=None):
@katzchang
katzchang / Makefile
Last active October 13, 2015 20:28
gauche unitを書いた
GOSH=/usr/local/bin/gosh
L=./gu.scm
test:
$(GOSH) -l $(L) ./*test.scm
@shikajiro
shikajiro / gist:3041123
Created July 3, 2012 17:15
Google SpreadsheetをJSONを返すダミーサーバーとして利用する方法
###
GoogleShpreadsheetのシートに記述されたデータをDBのテーブルに見立て取得し、
JSONに変換するスクリプト。
このソースはTitanium Mobileを想定しているが、コンバートの処理は流用できる。
テストに使用しているShpreadsheetは以下
https://docs.google.com/spreadsheet/ccc?key=0AuCUD7G5hGZrdGlBbHBDVElfUXdsbWRkRThVcmdCalE
条件:1行目をカラム名にすること
LEFT JOINなどの処理は別途本気出して実装する必要あり。
@shigeki
shigeki / http-request_rev.js
Created May 24, 2012 12:45
Node.js HTTP Request Sample Code
var http = require('http');
var ran = 0;
var queryNum = 100;
var parallel = 10;
var agent = new http.Agent({maxSockets: parallel});
if (process.argv.length != 5) {
console.error('usage: node http-request.js host port url\n' +
'ex). node http-request.js example.com 8080 /index.html');
process.exit(-1);
@tkarpinski
tkarpinski / github_issues_to_csv.rb
Created April 12, 2012 18:09 — forked from henare/github_issues_to_csv.rb
Exports Github issues to CSV (API v3)
require 'octokit'
require 'csv'
require 'date'
# Github credentials to access your private project
USERNAME="USER_NAME"
PASSWORD="SEKRIT"
# Project you want to export issues from
USER="REPO_OWNER"
PROJECT="REPO_NAME"