Skip to content

Instantly share code, notes, and snippets.

@jtsaito
jtsaito / gist:46bea2949f27cc4e4915
Last active August 29, 2015 14:07
Adding a new receipt to OPS Works Custom Cookbooks
  1. Checkout Custom Cookbooks git repo, edit cookbook sub directory you want to edit (e.g, "my-backup")
  2. Make your changes, upload branch
  3. Include recipe (e.g., "my-backup::monitoring") to your OPS Works layer's Custom Cookbooks
  4. Set branch in OPS Works Stack settings
  5. Update cookbooks (Deployments => Run Command)
  6. Trigger setup (Deployments => Setup)
  7. Find site-cookbooks directory on instance node
  8. Edit cookboooks on instance node and trigger setup to run remote changes
@jtsaito
jtsaito / gist:0ee8f8527b7fa9e2bc47
Last active August 29, 2015 14:05
Tokyo, places and food

Some Placs in Tokyo

  • Itoya on the Ginza (銀座): for some reason Japan is great at stationaries. The mother of all stationaries is Itoya on the Ginza ("Tokyo's Ku'Damm"). You can easily spend one or two hours at Itoya. Sony's flagg ship store is also located here together with plenty of camera stores and luxury reatilers. Also, don't forget to visit a Japanese department store (they are quite a culture of their own allbeit fading, Mitsukoshi Department Store)
  • Shinjuku Gyouen (新宿区): my favorite garden in Tokyo, hang out with some food you bring a long from a convenience store. There is an admission of a few hundred Yen per person.
  • Tokyo City Hall and Shinjuku (新宿区): free great view from the top flor (thus much cheaper than the Tokyo Tower). walkable from Shinjuku station. There are plenty of Pachinko parlors and game centers close to Shinjuku station. Also just walk around inside the statio
@jtsaito
jtsaito / gist:29a5eb41b054dad6e82c
Last active December 14, 2015 09:48
On Provisioning a Simple Rails App with OpsWorks

Fourteen-step procedure

... which I followed for setting up a simple Rails App on Opsworks.

  1. Set up an IAM role for ssh to the instances later
  2. Set up a Stack
  3. Set up a Layer RDS instace (used MySQL)
  4. Set up the RDS' VPC id, endpoint, master user, password
  5. Create a database for the App and a user to connect to it using the db master user
  6. Add the RDS details in the database section of the custom JSON (see custom json below)
class GooglePlayVerification
require 'google/api_client'
# Refer:
# https://code.google.com/p/google-api-ruby-client/issues/detail?id=72
# and
# http://jonathanotto.com/blog/google_oauth2_api_quick_tutorial.html
# and
# http://milancermak.wordpress.com/2012/08/24/server-side-verification-of-google-play-subsc/
GOOGLE_KEY = 'xxx-xxx.apps.googleusercontent.com'
@jtsaito
jtsaito / podcasts.txt
Last active December 21, 2015 23:29
Some podcasts I like to listen to
Some Podcasts
The format of the list entries is as follows.
Title of podcast (ratio of decent to boaring shows)
Url of show
Frenquency and duration of shows
Remarks