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
Git練習用 | |
Git練習用 | |
Git練習用 | |
Git練習用 | |
Git練習用 | |
Git練習用 | |
Git練習用 | |
Git練習用 | |
Git練習用 | |
Git練習用 |
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 'mongo' | |
require 'time' | |
DATA_NUM = 3000000 | |
DB_NAME = 'blog' | |
COLL_NAME = 'entry' | |
@client = Mongo::MongoClient.new('localhost', 27017) | |
@db = @client[DB_NAME] |
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
#!/bin/sh | |
#for Amazon Linux | |
yum install ruby19 | |
yum install ruby19-devel | |
ln -s /usr/bin/ruby1.9 /usr/bin/ruby | |
ln -s /usr/bin/gem1.9 /usr/bin/gem | |
gem install mongo | |
yum groupinstall "Development Tools" | |
gem install bson_ext |
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
<html> | |
<head> | |
<style> | |
<!-- | |
.ticker { | |
margin: 0 auto; | |
padding: 10px; | |
width: 600px; | |
text-align: left; | |
border: #ccc 1px solid; |
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
<!DOCTYPE html> | |
<html lang="ja"> | |
<head> | |
<meta charset="utf-8"> | |
<title>MongoDB Advent Calendar 2013</title> | |
<link rel="stylesheet" href="style.css"> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js"></script> | |
<script type="text/javascript"> | |
<!-- | |
var find = function(option){ |
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 'aws-sdk' | |
ACCESS_KEY_ID = 'xxxx' | |
SECRET_ACCESS_KEY = 'xxxx' | |
BUKETS = 'xxxx' | |
s3 = AWS::S3.new( | |
access_key_id: ACCESS_KEY_ID, | |
secret_access_key: SECRET_ACCESS_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
PWD=$(shell pwd) | |
MODULE_NAME=YOUR_PROJECT_NAME | |
LIB_NAME=lib$(MODULE_NAME).dylib | |
LIB_PATH=$(PWD)/$(LIB_NAME) | |
SWIFT_MODULE_PATH=$(PWD)/$(MODULE_NAME).swiftmodule | |
module: clean | |
xcrun -sdk macosx swift -emit-library -o $(LIB_PATH) -Xlinker -install_name -Xlinker @rpath/$(LIB_NAME) -emit -module -emit-module-path $(SWIFT_MODULE_PATH) -module-name $(MODULE_NAME) -module-link-name $(MODULE_NAME) *.swift | |
clean: |
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
let scrollstep = 250 | |
let blacklists = ["*://gist.github.com/*", "*://github.com/*", "*://mail.google.com/*", "*://*.rakuten-bank.co.jp/*"] |
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
# input | |
$n = 4 | |
$a = [1, 2, 4, 7] | |
$k = 13 | |
# 配列aからいくつか選び、その和をちょうどkにすることが | |
# できるかを求める | |
def dfs(i, sum) | |
return sum == $k if i == $n |
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
# input | |
MAX_N, MAX_M = 100, 100 | |
$INF = 100_000_000 | |
str = <<"EOS" | |
#S.#.....# | |
#.....##.# | |
#.#.#..#..# | |
#..#..#### | |
####G##### |
OlderNewer