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 entity; | |
import com.amazonaws.services.dynamodb.datamodeling.DynamoDBAttribute; | |
import com.amazonaws.services.dynamodb.datamodeling.DynamoDBAutoGeneratedKey; | |
import com.amazonaws.services.dynamodb.datamodeling.DynamoDBHashKey; | |
import com.amazonaws.services.dynamodb.datamodeling.DynamoDBRangeKey; | |
import com.amazonaws.services.dynamodb.datamodeling.DynamoDBTable; | |
@DynamoDBTable(tableName = "shortingUrl") | |
public class Bookmark { |
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 cluster = require('cluster'), | |
connect = require('connect'); | |
var numCPUs = parseInt(process.argv[2]); | |
if (cluster.isMaster) { | |
for (var i = 0; i < numCPUs; i++) { | |
cluster.fork(); | |
} |
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 http = require('http'), | |
fs = require('fs'), | |
url = require('url'), | |
mime = require('mime'), | |
domain = require('domain'); | |
var server = http.createServer(function (req, res) { | |
var uri = url.parse(req.url, true), | |
filename = __dirname + '/public' + uri.pathname; |
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 | |
require 'markdown' | |
src_file = ARGV[0] | |
File.open(src_file) do |src| | |
content = Markdown.new(src.read).to_html | |
template = DATA.read | |
puts template.gsub(/#\{content\}/, content) |
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
warning: You ran 'git add' with neither '-A (--all)' or '--ignore-removal', | |
whose behaviour will change in Git 2.0 with respect to paths you removed. | |
Paths like 'aaa.txt' that are | |
removed from your working tree are ignored with this version of Git. | |
* 'git add --ignore-removal <pathspec>', which is the current default, | |
ignores paths you removed from your working tree. | |
* 'git add --all <pathspec>' will let you also record the removals. |
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/bash | |
# from here: http://www.codingsteps.com/install-redis-2-6-on-amazon-ec2-linux-ami-or-centos/ | |
# and here: https://raw.github.com/gist/257849/9f1e627e0b7dbe68882fa2b7bdb1b2b263522004/redis-server | |
############################################### | |
# To use: | |
# wget https://raw.github.com/gist/2776679/04ca3bbb9f085b192f6aca945120fe12d59f15f9/install-redis.sh | |
# chmod 777 install-redis.sh | |
# ./install-redis.sh | |
############################################### | |
echo "*****************************************" |
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
# | |
# Fluent | |
# | |
# Copyright (C) 2011 FURUHASHI Sadayuki | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 |
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 clone https://github.com/hakobera/nodejs-vs-avatarjs | |
$ cd nodejs-vs-avatarjs | |
$ ./prepare.sh | |
$ ./benchmark.sh | |
<< 1. Calc fibonacci >> | |
[Run on Node.js] | |
fibonacci(10) x 1,234,754 ops/sec ±2.14% (86 runs sampled) | |
fibonacci(20) x 10,170 ops/sec ±2.63% (84 runs sampled) | |
fibonacci(30) x 71.90 ops/sec ±3.99% (63 runs sampled) |
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
# Credits: | |
# Jason Pirkey, Táve Corporation, http://www.tave.com/ | |
# Jeremy Mickelson, https://github.com/CyborgMaster | |
# See http://help.papertrailapp.com/kb/hosting-services/amazon-elastic-beanstalk | |
packages: | |
yum: | |
rubygems: [] | |
ruby-devel: [] |
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
packages: | |
rpm: | |
mackerel: "http://yum.mackerel.io/centos/x86_64/mackerel-agent-0.7.0-1.noarch.rpm" | |
files: | |
/etc/mackerel-agent/mackerel-agent.conf: | |
mode: "00644" | |
owner: root | |
group: root | |
encoding: plain |