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
# encoding: UTF-8 | |
# Place in config/deploy.rb | |
# See: https://gist.github.com/joost/9343156 | |
# Adapted to work with rbenv | |
namespace :rails do | |
desc "Open the rails console on primary app server" | |
task :console do | |
on roles(:app), primary: true do | |
rails_env = fetch(:stage) | |
execute_interactively "#{bundle_cmd} #{current_path}/script/rails console #{rails_env}" |
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
You need to do base backups often... | |
sudo -u postgres envdir /etc/wal-e.d/env /usr/local/bin/wal-e backup-push /usr/local/pgsql/data | |
You can check how many objects are not archived: | |
./var/backup_status.sh |
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
; call trello2org interactively | |
; or pragmatically like this: (trello2org "c:/Users/jfurtney/blo-up-2-7.json") | |
(require 'json) | |
(defun convert-trello-json-file-to-org (trello-json-file) | |
(let* ((board (json-read-file trello-json-file)) | |
(board-name (cdr (assoc 'name (cdr board)))) | |
(lists (cdr (assoc 'lists (cdr board)))) |
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
// trello variables | |
var api_key = "<your_api_key>"; | |
var api_token = "<your_api_token>"; | |
var board_id = "<your_board_id>"; | |
var url = "https://api.trello.com/1/"; | |
// google variables | |
var spreadsheet = "<your_spreadsheet_id>"; | |
var key_and_token = "key="+api_key+"&token="+api_token; |
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
## | |
# Use this behind the scenes to migrate files from your filesystem to Amazon S3 | |
# %: rake paperclip_migration:migrate_to_s3 | |
## | |
namespace :attachments do | |
desc "migrate files from filesystem to s3" | |
task :migrate_to_s3 => :environment do | |
require 'aws/s3' |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<style type="text/css"> | |
#bar{ | |
width:200px; | |
height:25px; | |
border:1px solid black; | |
position:relative; |