Skip to content

Instantly share code, notes, and snippets.

@takyam-git
takyam-git / index.php
Created March 7, 2015 07:56
PHPParserおためし
<?php
define('MY_CONSTANT', 1234);
$constantName = 'MY_CONSTANT2';
define($constantName, 7890);
$globalVariable = 'aiueo';
$GLOBALS['secondGlobal'] = 'abcde';
function globalFunction($arg1, $arg2 = false)
{
global $globalVariable, $globalVariable2;
$localVariable = 2;
@takyam-git
takyam-git / dwango5.go
Created December 10, 2014 11:59
Dwango@5
package main
import (
"os"
"net/http"
"io"
"path/filepath"
"sync"
"github.com/codegangsta/cli"
"runtime"
@takyam-git
takyam-git / Gmail-x-ml-name-filter-sample.js
Created December 13, 2012 07:29
Google Apps Script で、 受信箱(Inbox)の X-ML-NAME をキーに ラベルをつけてアーカイブするサンプル。
function processInbox() {
var match_x_ml_name = function(message, name){
var raw = message.getRawContent();
var reg = new RegExp('X-ML-Name:(\\s+)?' + name, 'g');
return raw.match(reg) != null;
}
var filters = [
['x-ml-name_value', 'parent_label/child_label']
];
@takyam-git
takyam-git / GoogleReader.coffee
Created April 1, 2012 09:44
PhoneGapでGoogleReaderにアクセスするモデル的なやつ(書いただけで動作検証まだ)
#
# GoogleReaderへのアクセサ的な何か
# GoogleのOAuth2については下記サイトを参照
# http://www.eisbahn.jp/yoichiro/2011/10/oauth2-0_google-api.html
# * Phonegap ONLY
# * Need "ChildBrowser" plugin
# * Need enable cross domain post request
#
class GoogleReader
# コンストラクタ