Skip to content

Instantly share code, notes, and snippets.

View juno's full-sized avatar
💰
writing code (almost) every weekday

Junya Ogura juno

💰
writing code (almost) every weekday
View GitHub Profile
■afoot {形-1} : 徒歩の
■afoot {形-2} : 進行中の /【用例】Changes were afoot. 変化は起きて[進行して]いた。
■afoot {副-1} : 徒歩で◆【同】on foot /【用例】The police went afoot to find the missing boy lost in the forest. 警察は、森の中で迷子になった子供を捜そうと歩いていった。
■afoot {副-2} : 進行して、進行中で、起きて◆【同】in progress
■beside {前-1} : ~のそばに[で]、~の傍らに、~の脇に /【用例】Our house stands beside the church. 私たちの家は教会のそばに立っている。
■beside {前-2} : はずれて
■dash of : 《a ~》少量の、わずかの /【用例】Sprinkle dash of nutmeg. ナツメグ少々を振りかけてください。
■germ {名-1} : 細菌、病原菌 /【用例】When sneezing, you might spread germs. くしゃみをするとき、あなたは病原菌をまき散らしているのかもしれない。
■germ {名-2} : 〔植物の〕胚、芽、胚芽
■germ {名-3} : 〔発展の基礎となる〕初期段階、芽生え、兆し
@juno
juno / github-api-practice.rb
Created January 22, 2011 12:49
w/HTTParty
require 'json'
require 'httparty'
class Github
include HTTParty
base_uri 'http://github.com/api/v2/json'
# @param [String] username GitHub username
# @param [String] password Password or API token
def initialize(username, password)
@juno
juno / history-api.html
Created January 28, 2011 02:57
HTML5 History API example
<!DOCTYPE html>
<html>
<head>
<title>Test Site</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
window.onpopstate = function(event) {
if (event.state) { // workaround for Chrome
console.debug('onpopstate fired: ' + event.state.name);
@juno
juno / nodejs-aws-example.js
Created February 8, 2011 07:47
AWS EC2 access example w/nodejs, express, aws-lib
var app = require('express').createServer();
var aws = require('aws-lib');
var access_key_id = '***';
var secret_access_key = '***';
var endpoint = 'ec2.ap-southeast-1.amazonaws.com'; // ap-southeast-1
var ec2 = aws.createEC2Client(access_key_id, secret_access_key, {host: endpoint});
app.get('/', function(req, res) {
console.log('/');
$ sudo chown -R $USER /usr/local
$ curl -Lsf http://github.com/mxcl/homebrew/tarball/master | tar xz --strip 1 -C/usr/local
@juno
juno / open.rb
Created March 31, 2011 09:59
earthquake.gem open url plugin
# :open $xx
Earthquake.init do
command %r|^:open (\d+)|, :as => :open do |m|
`open #{$1}` if twitter.status(m[1])['text'] =~ %r|(https?://[^\s]+)|
end
end
@juno
juno / README.md
Created April 1, 2011 07:54
AWS EC2のインスタンス状態をポーリングしてZeroMQにPub/Subするデモ。

Prerequisite

$ brew install zeromq
$ ARCHFLAGS="-arch x86_64" gem install zmq -- --with-zmq-dir=/usr/local
$ gem install amazon-ec2

Run

@juno
juno / index.html
Created April 9, 2011 14:00
jQuery Waypoints Plugin exercise
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>jQuery Waypoints exercise</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script>
<script src="waypoints.min.js"></script>
<script src="pages.js"></script>
</head>
@juno
juno / gemref
Created April 9, 2011 17:23
display runtime gem information in ./Gemfile
#!/usr/bin/env ruby
require 'ansi/code'
require 'bundler'
require 'json'
require 'open-uri'
class Integer
def to_currency
self.to_s.reverse.gsub(/(\d{3})(?=\d)/, '\1,').reverse
end
@juno
juno / index.html
Created April 29, 2011 13:13
ヘッダ部を固定してスクロールするデザイン
<!doctype html5>
<html>
<head>
<title>Practice</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<header>
<div class="inner">
<h1>Hello</h1>