Skip to content

Instantly share code, notes, and snippets.

View ofl's full-sized avatar
💭
I may be slow to respond.

Shin Morichika ofl

💭
I may be slow to respond.
View GitHub Profile
@cucmberium
cucmberium / gist:e687e88565b6a9ca7039
Last active February 28, 2024 01:23
Twitterの検索API & Twitterでの検索術

twitterの検索術 (search/tweetssearch/universal)

search/tweets では一週間以上前のツイートは検索できないので注意

search/universal は公式のConsumerKey/ConsumerSecretでないと使用できない

当方では一切の責任を負いません

@Leko
Leko / autoUpdate.php
Last active December 20, 2015 08:09
Puppetfileを自動更新するスクリプト
<?php
define("READ_START_SYMBOL", "# ---auto update---");
define("READ_END_SYMBOL", "# ---/auto update---");
//
function notify_update($name, $from, $to) {
echo "updated '".$name."' from ".$from." to ".$to."\n";
}
@hayajo
hayajo / changelog_en.md
Last active May 3, 2024 08:29
ChangeLog を支える英語

ChangeLog を支える英語

ChangeLog を書く際によく使われる英語をまとめました。

ほとんど引用です。

基本形

@rosylilly
rosylilly / gist:3401612
Created August 20, 2012 06:40
先輩と覚える HTTP ステータスコード

先輩に学ぶ HTTP Status Code

超雑にまとめました。修正してください。

登場人物

  • アプリケーション先輩: いつも忙しい。横に広がるのが得意(デブじゃない)。
  • 後輩: 頼んでばっかしで役に立たない。
  • サーバー先輩: アプリケーション先輩と仲がいい。Unix Socket でつながるくらい仲良し。
  • プロクシ先輩: アプリケーション先輩とかサーバー先輩と後輩の間を取り持って代わりに伝えたりしてくれる。たまに勝手にレスポンスを書き換える。
@yagitoshiro
yagitoshiro / gist:3039968
Last active October 19, 2015 05:50
Titanium Mobile用のSQLiteを扱うクラス・第二形態 update: 更新も保存もsaveに統一
# モデルがこれだけで作れたら素敵じゃないか
# entry.coffee
Database = require('libs/database')
class Entry extends Database
initialize:()->
@property 'title', 'text'
@property 'body', 'text'
super
module.exports = new Entry('entries')
@Shamaoke
Shamaoke / coffeescript_singleton.coffee
Created March 16, 2012 13:13
CoffeeScript Singleton
# class
class Singleton
constructor: ->
throw new Error 'Singleton error' if @.constructor is Singleton or @.constructor._instance
@.constructor._instance = @
@instance: (arg...) ->
unless @._instance
new @ arg...
else
@._instance
@bjhomer
bjhomer / UIWebView+AccessoryHiding.m
Created March 16, 2012 05:03
Hiding the inputAccessoryView of a UIWebView
#import <objc/runtime.h>
#import <UIKit/UIKit.h>
@interface UIWebView (HackishAccessoryHiding)
@property (nonatomic, assign) BOOL hackishlyHidesInputAccessoryView;
@end
@implementation UIWebView (HackishAccessoryHiding)
static const char * const hackishFixClassName = "UIWebBrowserViewMinusAccessoryView";
@lucasfais
lucasfais / gist:1207002
Created September 9, 2011 18:46
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@mwaterfall
mwaterfall / gist:953664
Created May 3, 2011 16:28
NSDate from Internet Date & Time String
//
// NSDate+InternetDateTime.h
// MWFeedParser
//
// Created by Michael Waterfall on 07/10/2010.
// Copyright 2010 Michael Waterfall. All rights reserved.
//
#import <Foundation/Foundation.h>
@ryu22e
ryu22e / twitter-stream.js
Created February 3, 2011 12:13
node.jsでTwitter Streaming APIを呼んでみる
// Twitterモジュールをインストールする必要がある。
var sys = require('sys'),
twitter = require('twitter');
var twit = new twitter({
consumer_key: '****', // CONSUMER_KEYを指定する。
consumer_secret: '****', // CONSUMER_SECRETを指定する。
// ACCESS_TOKEN_KEYとACCESS_TOKEN_SECRETの取得はhttps://gist.github.com/802917を参照。
access_token_key: '****', // ACCESS_TOKEN_KEYを指定する。
access_token_secret: '****' // ACCESS_TOKEN_SECRETを指定する。
});