View vim-on-heroku.sh
#!/usr/bin/env bash
curl https://s3.amazonaws.com/heroku-jvm-buildpack-vi/vim-7.3.tar.gz --output vim.tar.gz
mkdir vim && tar xzvf vim.tar.gz -C vim
export PATH=$PATH:/app/vim/bin
View gist:6302581

@ITやテッククランチがアホすぎてつらい。

要約

Rap GeniusというサービスがHerokuに月額2万ドル払っていて、そのサービスに満足していたという。 内訳はよくわからないが、Herokuの「サクセスストーリー」に公開されているところによると、彼らはWeb用のdynoを120使っているとのこと。 http://success.heroku.com/rapgenius

New Relic(サードパーティのパフォーマンス計測アドオン)には年間 $63116.13 払っているという。

View gist:5551605
# Tested on DelayedJob 2.1
class MyRecurringDelayedJob
def perform
# ...some slow code
end
def success(job)
MyRecurringDelayedJob.schedule_job(job)
end
View packet.rb
require 'socket'
ETH_P_ALL = 0x0300
ETH_P_IP = 0x800
class MacAddr
def initialize(addr)
@addr = addr
end
View haiku
haiku = ->
adjs = [
"autumn", "hidden", "bitter", "misty", "silent", "empty", "dry", "dark",
"summer", "icy", "delicate", "quiet", "white", "cool", "spring", "winter",
"patient", "twilight", "dawn", "crimson", "wispy", "weathered", "blue",
"billowing", "broken", "cold", "damp", "falling", "frosty", "green",
"long", "late", "lingering", "bold", "little", "morning", "muddy", "old",
"red", "rough", "still", "small", "sparkling", "throbbing", "shy",
"wandering", "withered", "wild", "black", "young", "holy", "solitary",
"fragrant", "aged", "snowy", "proud", "floral", "restless", "divine",
View gist:5411046
# Generating 2048 key file with RSA
openssl genrsa 2048 > host.key
# Generating certificate for 10 years with our new key
# couple of question will be promted
# when you will be asked for Common Name, you need to specify *.domain.com
openssl req -new -x509 -nodes -sha1 -days 3650 -key host.key > host.cert
# getting info for our certificate
openssl x509 -noout -fingerprint -text < host.cert > host.info
View Digital-Ocean-Ubuntu-1210-64bit-LAMP-Server
#!/bin/bash
# log into your server
ssh root@[server ipaddress]
# change root password
passwd
# update all packages and operating system
apt-get update && apt-get --yes upgrade
View gist:5402331
How to setup Heroku Hostname SSL with GoDaddy SSL Certificate and Zerigo DNS
Heroku recently added an exciting new 'Hostname SSL' option. This option offers the broad compatibility of IP-based SSL, but at 1/5 the price ($20 / month at the time of this writing).
The following tutorial explains how to use Heroku's new 'Hostname SSL' option on your Heroku project. Before we begin, let's list what we're using here:
* Heroku Hostname SSL
* GoDaddy Standard SSL Certificate
* Zerigo DNS
View gist:5401572
How to setup Heroku Hostname SSL with GoDaddy SSL Certificate and Zerigo DNS
Heroku recently added an exciting new 'Hostname SSL' option. This option offers the broad compatibility of IP-based SSL, but at 1/5 the price ($20 / month at the time of this writing).
The following tutorial explains how to use Heroku's new 'Hostname SSL' option on your Heroku project. Before we begin, let's list what we're using here:
* Heroku Hostname SSL
* GoDaddy Standard SSL Certificate
* Zerigo DNS
Note: I am not using the Heroku Zerigo DNS add-on, instead I have a separate Zerigo account for my DNS needs. I do this because Zerigo offers 30 hosts on free direct accounts, versus only 10 hosts on the free Heroku add-on.
View gist:5401566
How to setup Heroku Hostname SSL with GoDaddy SSL Certificate and Zerigo DNS
Heroku recently added an exciting new 'Hostname SSL' option. This option offers the broad compatibility of IP-based SSL, but at 1/5 the price ($20 / month at the time of this writing).
The following tutorial explains how to use Heroku's new 'Hostname SSL' option on your Heroku project. Before we begin, let's list what we're using here:
* Heroku Hostname SSL
* GoDaddy Standard SSL Certificate
* Zerigo DNS