$ cd /path/to/your/rails/app
$ heroku pg:backups capture
$ curl -o latest.dump `heroku pg:backups public-url`
OR
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
A::B is a system with 4 tokens: `A#`, `#A`, `B#` and `#B`. | |
An A::B program is a sequence of tokens. Example: | |
B# A# #B #A B# | |
To *compute* a program, we must rewrite neighbor tokens, using the rules: | |
A# #A ... becomes ... nothing | |
A# #B ... becomes ... #B A# |
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
{"product_info":{"product_info_addr":"product_info_addr","product_id":"75"},"page_num":8,"page_data":[{"//":"电池界面","valid":1,"page_index":0,"lightness":100,"speed_ms":50,"color":{"default":false,"back_rgb":"#000000","rgb":"#000000"},"word_page":{"valid":0,"word_len":0,"unicode":["#0000"]},"frames":{"valid":0,"frame_num":0,"frame_data":[{"frame_index":0,"frame_RGB":["#000000"]}]},"keyframes":{"valid":0,"frame_num":0,"frame_data":[{"frame_index":0,"frame_RGB":["#000000"]}]}},{"//":"马赛克界面","valid":1,"page_index":1,"lightness":100,"speed_ms":50,"color":{"default":false,"back_rgb":"#000000","rgb":"#000000"},"word_page":{"valid":0,"word_len":0,"unicode":["#0000"]},"frames":{"valid":0,"frame_num":0,"frame_data":[{"frame_index":0,"frame_RGB":["#000000"]}]},"keyframes":{"valid":0,"frame_num":0,"frame_data":[{"frame_index":0,"frame_RGB":["#000000"]}]}},{"//":"时间界面","valid":1,"page_index":2,"lightness":100,"speed_ms":50,"color":{"default":false,"back_rgb":"#000000","rgb":"#ffffff"},"word_page":{"valid":0,"word_len":0,"u |
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
# Using Sequel with Sinatra (Unicorn) on Heroku and getting this error: | |
# Sequel::DatabaseDisconnectError - PG::ConnectionBad: PQconsumeInput() SSL error: decryption failed or bad record mac. | |
# Need to do some forking. | |
# In unicorn.rb: | |
worker_processes 4 # amount of unicorn workers to spin up | |
timeout 30 # restarts workers that hang for 30 seconds | |
preload_app true # avoid regeneration of jekyll site for each fork | |
before_fork do |server, worker| | |
Signal.trap 'TERM' do |
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
# 1) Create your private key (any password will do, we remove it below) | |
$ cd ~/.ssh | |
$ openssl genrsa -des3 -out server.orig.key 2048 | |
# 2) Remove the password | |
$ openssl rsa -in server.orig.key -out server.key |
- 1 1/3 lb grass-fed beef
- 2 tbsp Worcestershire sauce
- 3/4 tsp ground coriander seed
- 1/2 tsp garlic powder
- 1/4 tsp ground cumin
- 4 tbsp softened butter
- 1/2 tsp freshly ground pepper
- 1/2 tsp freshly ground sea salt
- 4 pieces of fresh cheese (Muenster or sharp cheddar are best)
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 | |
# API Documentation at http://api.wikia.com/wiki/LyricWiki_API | |
require 'open-uri' | |
require 'json' | |
require 'tmpdir' | |
ARTIST = "Johnny Cash" |
This allows you to use the following video streaming services outside of the US from your Mac without having to use a proxy or VPN, so no big bandwidth issues:
- Hulu / HuluPlus
- CBS
- ABC
- MTV
- theWB
- CW TV
- Crackle
- NBC
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 "rubygems" | |
require "awesome_print" | |
Pry.print = proc { |output, value| output.puts value.ai } |
NewerOlder