どんな風に表示されるのかな
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 "twitter" |
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 "net/http" | |
require "net/https" | |
require "rubygems" | |
require "json" | |
HOST="www.googleapis.com" | |
PORT=443 | |
API_URL="/urlshortener/v1/url?key=YOUR-API key" | |
def shorten_url long_url |
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
class CreateUsers < ActiveRecord::Migration | |
def self.up | |
create_table :users do |t| | |
t.string :uid, :null => false | |
t.string :name, :null => false | |
t.timestamps | |
end | |
add_index :users, [:uid] | |
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
echo -e "\e[30m黒色" | |
echo -e "\e[31m赤色" | |
echo -e "\e[32m緑色" | |
echo -e "\e[33m黄色" | |
echo -e "\e[34m青色" | |
echo -e "\e[35m赤紫色(マゼンタ)" | |
echo -e "\e[36m水色(シアン)" | |
echo -e "\e[37m白色" |
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
[loggers] | |
keys=root,hogehogetool | |
[handlers] | |
keys=defaultHandler,hogehogetoolHandler | |
[formatters] | |
keys=simpleFormatter | |
[logger_root] |
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 argparse | |
if __name__ == "__main__": | |
### define config | |
parser = argparse.ArgumentParser(description='This script is ...') | |
parser.add_argument("-c", "--configpath", required=True, help='config file path') | |
parser.add_argument("-l", "--logtype", required=True, help='logtype ex. hogefuga') | |
args = parser.parse_args() | |
hg = Hogehoge(args.configpath, args.logtype) |
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 ConfigParser | |
inifile = ConfigParser.SafeConfigParser() | |
inifile.read("xxxxxx/config.ini") | |
param = inifile.get("common", "hogehoge_param") | |
aws_key_id = inifile.get("aws","aws_key") |
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
from time import sleep | |
from tqdm import tqdm | |
for i in tqdm(range(100)): | |
sleep(0.1) |
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
[main] | |
aaaa = hogehoge | |
bbbb = fugafuga | |
cccc = mogumogu |
OlderNewer