This file contains hidden or 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
console.log('hello gist api'); | |
console.log('and edit it'); |
This file contains hidden or 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
/*jslint indent: 4*/ | |
/*jslint node: true */ | |
'use strict'; | |
var fs = require('fs'), | |
conf = {}, | |
conf_dir = '/config'; | |
conf.home = process.env.NODE_HOME || '.'; | |
conf.env = process.env.NODE_ENV || 'development'; |
This file contains hidden or 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
def getdefaultlocale(envvars=('LC_ALL', 'LC_CTYPE', 'LANG', 'LANGUAGE')): | |
# 略 | |
import os | |
lookup = os.environ.get | |
for variable in envvars: | |
localename = lookup(variable,None) | |
if localename: | |
if variable == 'LANGUAGE': |
This file contains hidden or 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
/*jslint indent: 4*/ | |
/*jslint node: true */ | |
'use strict'; | |
var Twitter = require('ntwitter'), | |
logger = require('fluent-logger'); | |
logger.configure('td.test_db', {host: 'localhost', port: 24224}); | |
var twit = new Twitter({ | |
consumer_key: 'XXX', |
This file contains hidden or 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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import MeCab | |
import sys | |
mecab = MeCab.Tagger('-Ochasen') | |
result = {} | |
linenum = 0 |
This file contains hidden or 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($) { | |
var namespace = 'plugin_name'; | |
$.fn[namespace] = function(options) { | |
var elements = this, | |
settings = $.extend({ | |
'param': 'default value' | |
}, options); | |
elements.each(function() { |
This file contains hidden or 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
<h1>Remote page</h1> | |
<p> | |
Hello, I am an HTML fragment and I was fetched using <code>XMLHttpRequest</code> | |
</p> |
This file contains hidden or 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 startSuccessfullGetTest() { | |
var output = document.getElementById('output'); | |
if (!output) { | |
return; | |
} | |
function log(text) { | |
if (output && typeof output.innerHTML !== 'undefined') { | |
output.innerHTML = text; | |
} else { |