Skip to content

Instantly share code, notes, and snippets.

@ToQoz
ToQoz / start_docker_registry_on_eb.sh
Last active January 3, 2016 13:44 — forked from kntyskw/start_docker_registry_on_eb.sh
Starts private docker repository backed by S3 on ElasticBeanstalk environment. It is supposed to launch before the application container is launched so that the application container image can be pulled from the local private repository.
#!/bin/bash
. /opt/elasticbeanstalk/hooks/common.sh
# Load ElasticBeanstalk environment variables
touch /tmp/env.sh
chmod 600 /tmp/env.sh
jq .docker.env[] $EB_CONFIG_FILE | tr -d \" > /tmp/env.sh
@ToQoz
ToQoz / 0-README.md
Last active December 12, 2015 06:29 — forked from rummelonp/0-README.md
@ToQoz
ToQoz / bundler.zsh
Created November 28, 2012 03:18 — forked from jmazzi/bundler.zsh
alias be="bundle exec"
alias bi="bundle install"
alias bl="bundle list"
alias bu="bundle update"
alias bp="bundle package"
# The following is based on https://github.com/gma/bundler-exec
bundled_commands=(cap capify cucumber guard heroku rackup rails rake rspec ruby shotgun spec spork thin unicorn unicorn_rails)
@ToQoz
ToQoz / 音.rb
Created October 23, 2012 06:47
音.rb
require "mac-event-monitor"
monitor = Mac::EventMonitor::Monitor.new
monitor.add_listener(:key_down) do |event|
system("afplay #{ENV['HOME']}/bin/sounds/#{event.keycode % 14 + 1}.wav &")
end
monitor.add_listener(:mouse_move) do |event|
system("afplay #{ENV['HOME']}/bin/sounds/#{rand(14) + 1}.wav &")
end
monitor.run
@ToQoz
ToQoz / gist:3927108
Created October 21, 2012 14:19
Twitter公式クライアントのコンシューマキー

Twitter公式クライアントのコンシューマキー

Twitter for iPhone

Consumer key: IQKbtAYlXLripLGPWd0HUA
Consumer secret: GgDYlkSvaPxGxC4X8liwpUoqKwwr3lCADbz8A7ADU

Twitter for Android

Consumer key: 3nVuSoBZnx6U4vzUxf5w
Consumer secret: Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys

Twitter for iPad

Consumer key: CjulERsDeqhhjSme66ECg

@ToQoz
ToQoz / etc_init_d_unicorn.sh
Created August 10, 2012 02:52
/etc/init.d script for unicorn_rails
#!/bin/sh
#
# init.d script for single or multiple unicorn installations. Expects at least one .conf
# file in /etc/unicorn
#
# Modified by jay@gooby.org http://github.com/jaygooby
# based on http://gist.github.com/308216 by http://github.com/mguterl
#
## A sample /etc/unicorn/my_app.conf
##
\               ¦         /
  \             ¦        /
             / ̄ ̄ ヽ,
            /        ',      /     _/\/\/\/|_
    \    ノ//, {0}  /¨`ヽ {0} ,ミヽ    /     \          /
     \ / く l   ヽ._.ノ   ', ゝ \       <   IE バーカ!  >
     / /⌒ リ   `ー'′   ' ⌒\ \    /          \
     (   ̄ ̄⌒          ⌒ ̄ _)    ̄|/\/\/\/ ̄
      ` ̄ ̄`ヽ           /´ ̄
           |            |  
@ToQoz
ToQoz / nicodown
Created February 3, 2012 01:34 — forked from ssig33/nicodown
#!/usr/bin/env ruby
#coding:utf-8
require 'mechanize'
require 'xmlsimple'
video_ids = ARGV
mail = ''
password = ''
alice = Mechanize.new
@ToQoz
ToQoz / userstream.twitter.com2user.json.md
Created January 26, 2012 04:04 — forked from kkosuge/userstream.twitter.com2user.json.md
Twitter の User Streams で流れてくるやつ
" endtagcomment.vim
" こういうHTMLがあったときに
" <div id="hoge" class="fuga">
" ...
" </div>
"
" 実行するとこうなる
" <div id="hoge" class="fuga">
" ...
" <!-- /div#hoge.fuga --></div>