This file contains hidden or 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
namespace :generate do | |
desc 'Generate a timestamped, empty Sequel migration.' | |
task :migration, :name do |_, args| | |
if args[:name].nil? | |
puts 'You must specify a migration name (e.g. rake generate:migration[create_events])!' | |
exit false | |
end | |
content = "Sequel.migration do\n up do\n \n end\n\n down do\n \n end\nend\n" | |
timestamp = Time.now.to_i |
This file contains hidden or 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
desc 'Connect to Redis (production)' | |
task :redis do | |
redis_uri = `heroku config:get OPENREDIS_URL` | |
pattern = /redis:\/\/:(\S+)@(\S+):(\d+)/ | |
redis_uri[pattern] | |
command = "redis-cli -a #{$1} -h #{$2} -p #{$3}" | |
exec command | |
end |
This file contains hidden or 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
namespace :db do | |
require 'sequel' | |
namespace :migrate do | |
Sequel.extension :migration | |
task :connect do | |
if ENV['DATABASE_URL'] | |
DB = Sequel.connect(ENV['DATABASE_URL']) | |
else | |
puts 'ABORTING: You must set the DATABASE_URL environment variable!' |
This file contains hidden or 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 http-equiv="Content-type" content="text/html; charset=utf-8"> | |
<title>list.js international characters test</title> | |
<script type="text/javascript" src="list.min.js"></script> | |
</head> | |
<body> |