Ubuntu 12.10 setup (rbenv/RVM, Janus, PostgreSQL)
- Some utilities:
sudo apt-get install vim tmux git curl
- Copy/paste from the command line:
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>name</key> | |
<string>TestConsoleTheme</string> | |
<key>settings</key> | |
<array> | |
<dict> | |
<key>settings</key> |
# Clear existing task so we can replace it rather than "add" to it. | |
Rake::Task["deploy:compile_assets"].clear | |
namespace :deploy do | |
desc 'Compile assets' | |
task :compile_assets => [:set_rails_env] do | |
# invoke 'deploy:assets:precompile' | |
invoke 'deploy:assets:precompile_local' | |
invoke 'deploy:assets:backup_manifest' |
import sublime, sublime_plugin | |
import os.path, string | |
VALID_FILENAME_CHARS = "-_.() %s%s%s" % (string.ascii_letters, string.digits, "/:\\") | |
# { "keys": ["alt+o"], "command": "open_filename_under_cursor" } | |
# https://gist.github.com/1186126 | |
class OpenFilenameUnderCursor(sublime_plugin.TextCommand): | |
def run(self, edit): | |
for region in self.view.sel(): |
# Runs rake assets:clean | |
# Defaults to nil (no asset cleanup is performed) | |
# If you use Rails 4+ and you'd like to clean up old assets after each deploy, | |
# set this to the number of versions to keep | |
set :keep_assets, 2 | |
# Clear existing task so we can replace it rather than "add" to it. | |
Rake::Task["deploy:compile_assets"].clear | |
namespace :deploy do |
/* sans-serif */ | |
font-family: Arial, "Helvetica Neue", Helvetica, sans-serif; | |
font-family: Helvetica, "Helvetica Neue", Arial, sans-serif; | |
font-family: Verdana, Geneva, Tahoma, sans-serif; | |
font-family: Trebuchet, Tahoma, Arial, sans-serif; | |
font-family: GillSans, Calibri, Trebuchet, sans-serif; | |
font-family: "DejaVu Sans", "Bitstream Vera Sans", "Segoe UI", "Lucida Grande", Verdana, Tahoma, Arial, sans-serif; | |
font-family: Geneva, "Lucida Sans", "Lucida Grande", "Lucida Sans Unicode", Verdana, sans-serif; | |
font-family: Geneva, Verdana, "Lucida Sans", "Lucida Grande", "Lucida Sans Unicode", sans-serif; | |
font-family: "HelveticaNeue-Roman", "Helvetica 55 Roman", Helvetica, Arial, sans-serif; |
sudo apt-get install vim tmux git curl
Useful for when a blocking user experience is needed (in my case, didn't want people unwittingly loosing their place by scrolling while a modal required their attention): $.scrollLock()
locks the body in place, preventing scroll until it is unlocked.
// Locks the page if it's currently unlocked
$.scrollLock();
// ...or vice versa
Because I couldn't find these with a quick Google search on 28 April 2015: | |
Usage: | |
rails new APP_PATH [options] | |
Options: | |
-r, [--ruby=PATH] # Path to the Ruby binary of your choice | |
# Default: /home/brian/.rvm/rubies/ruby-2.2.0/bin/ruby | |
-m, [--template=TEMPLATE] # Path to some application template (can be a filesystem path or URL) | |
[--skip-gemfile], [--no-skip-gemfile] # Don't create a Gemfile |
# config/enviroments/development.rb | |
config.action_mailer.preview_path = "#{Rails.root}/app/mailer_previews" | |
# app/mailer_previews/devise_mailer_preview.rb | |
class Devise::MailerPreview < ActionMailer::Preview | |
def confirmation_instructions | |
Devise::Mailer.confirmation_instructions(User.first, {}) | |
end |
upstream plex-upstream { | |
# change plex-server.example.com:32400 to the hostname:port of your plex server. | |
# this can be "localhost:32400", for instance, if Plex is running on the same server as nginx. | |
server plex-server.example.com:32400; | |
} | |
server { | |
listen 80; | |
# server names for this server. |