$ sudo chown -R $USER /usr/local
$ curl -Lsf http://github.com/mxcl/homebrew/tarball/master | tar xz --strip 1 -C/usr/local
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
■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} : 〔発展の基礎となる〕初期段階、芽生え、兆し |
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 '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) |
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> | |
<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); |
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 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('/'); |
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
# :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 |
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> | |
<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> |
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 '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 |
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 html5> | |
<html> | |
<head> | |
<title>Practice</title> | |
<link rel="stylesheet" href="style.css"> | |
</head> | |
<body> | |
<header> | |
<div class="inner"> | |
<h1>Hello</h1> |