This file contains 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
var gamepad = null; | |
var timer = null; | |
window.addEventListener("gamepadconnected", function(e) { | |
if (!gamepad) { | |
gamepad = e.gamepad; | |
timer = setInterval('updateStatus()', 100); | |
} | |
}); |
This file contains 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
set nowritebackup | |
set nobackup | |
set noswapfile | |
set clipboard+=unnamed | |
set nrformats-=octal | |
set timeoutlen=3500 | |
set hidden | |
set history=50 | |
set formatoptions+=mM |
This file contains 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 | |
import sys | |
from optparse import OptionParser | |
import smtplib | |
from email.MIMEText import MIMEText | |
from email.Header import Header | |
from email.Utils import formatdate |
This file contains 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
import java.io.*; | |
import java.net.*; | |
import java.util.*; | |
import javax.swing.*; | |
public class GoogleChart { | |
/** Googleから画像を取得 */ | |
public ImageIcon get(Map<String, String> params) throws IOException { | |
Object[] keys = params.keySet().toArray(); |
This file contains 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
package main | |
/* | |
#include <stdlib.h> | |
#include <iconv.h> | |
#cgo LDFLAGS: -liconv | |
*/ | |
import "C" | |
import ( | |
"unsafe" |
This file contains 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
package main | |
import ( | |
"fmt" | |
"io/ioutil" | |
"net/http" | |
"net/url" | |
) | |
type Jar struct { |
This file contains 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
require 'tweetstream' | |
TweetStream.configure do |config| | |
config.consumer_key = '********' | |
config.consumer_secret = '********' | |
config.oauth_token = '********' | |
config.oauth_token_secret = '********' | |
config.auth_method = :oauth | |
end |
This file contains 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 ruby | |
# -*- coding: utf-8 -*- | |
require 'mechanize' | |
username = '****' | |
password = '****' | |
agent = Mechanize.new |
This file contains 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
package main | |
import ( | |
"fmt" | |
"reflect" | |
) | |
func StructToMap(data interface{}) map[string]interface{} { | |
result := make(map[string]interface{}) | |
elem := reflect.ValueOf(data).Elem() |
This file contains 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
# encoding: utf-8 | |
require 'redis' | |
require 'mongo' | |
def mongo2redis | |
redis = Redis.new | |
redis.flushall | |
connection = Mongo::Connection.new |
OlderNewer