THIS GIST WAS MOVED TO TERMSTANDARD/COLORS REPOSITORY.
PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!
| #!/bin/sh | |
| # Called by "git push" after it has checked the remote status, | |
| # but before anything has been pushed. | |
| # | |
| # If this script exits with a non-zero status nothing will be pushed. | |
| # | |
| # Steps to install, from the root directory of your repo... | |
| # 1. Copy the file into your repo at `.git/hooks/pre-push` | |
| # 2. Set executable permissions, run `chmod +x .git/hooks/pre-push` |
| //To fetch a branch, you simply need to: | |
| git fetch origin | |
| //This will fetch all of the remote branches for you. With the remote branches | |
| //in hand, you now need to check out the branch you are interested in, giving | |
| //you a local working copy: | |
| git checkout -b test origin/test |
| # i3 config file | |
| # | |
| # Please see http://i3wm.org/docs/userguide.html for a complete reference! | |
| set $mod Mod4 | |
| ##### | |
| # | |
| # Fonts | |
| # |
| # Main reference was lascarides' post at http://stackoverflow.com/questions/14743447/getting-pdf-from-wickedpdf-for-attachment-via-carrierwave | |
| # estimate.rb | |
| # ... | |
| has_attached_file :pdf, | |
| storage: :s3, | |
| s3_credentials: { | |
| access_key_id: ENV['AWS_ACCESS_KEY_ID'], | |
| secret_access_key: ENV['AWS_SECRET_ACCESS_KEY'], | |
| bucket: ENV['AWS_BUCKET'] |
| require "active_record" | |
| namespace :db do | |
| db_config = YAML::load(File.open('config/database.yml')) | |
| db_config_admin = db_config.merge({'database' => 'postgres', 'schema_search_path' => 'public'}) | |
| desc "Create the database" | |
| task :create do | |
| ActiveRecord::Base.establish_connection(db_config_admin) |
| # migrating from https://github.com/robbyrussell/oh-my-zsh/blob/master/plugins/git/git.plugin.zsh | |
| # Aliases | |
| alias g='git' | |
| #compdef g=git | |
| alias gst='git status' | |
| #compdef _git gst=git-status | |
| alias gd='git diff' | |
| #compdef _git gd=git-diff | |
| alias gdc='git diff --cached' |
| #!/usr/bin/env ruby | |
| require "srt" | |
| require "sanitize" | |
| REJECT_LINES = [/Best watched using Open Subtitles MKV Player/, | |
| /Subtitles downloaded from www.OpenSubtitles.org/, /^Subtitles by/, | |
| /www.tvsubtitles.net/, /[email protected]/, /addic7ed/, /allsubs.org/, | |
| /www.seriessub.com/, /www.transcripts.subtitle.me.uk/, /~ Bad Wolf Team/, | |
| /^Transcript by/, /^Update by /, /UKsubtitles.ru/ | |
| ] |
| --This is a handy PostreSQL script to fix sequences for all tables at once | |
| SELECT 'SELECT SETVAL(' ||quote_literal(quote_ident(S.relname))|| ', MAX(' ||quote_ident(C.attname)|| ') ) FROM ' ||quote_ident(T.relname)|| ';' | |
| FROM pg_class AS S, pg_depend AS D, pg_class AS T, pg_attribute AS C | |
| WHERE S.relkind = 'S' | |
| AND S.oid = D.objid | |
| AND D.refobjid = T.oid | |
| AND D.refobjid = C.attrelid | |
| AND D.refobjsubid = C.attnum | |
| ORDER BY S.relname; |
THIS GIST WAS MOVED TO TERMSTANDARD/COLORS REPOSITORY.
PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!
⌥← | send escape sequence | b⌥→ | send escapes sequence | f⌘← | send escape sequence | [H⌘→ | send escape sequence | [F⌥←Delete | send hex code | 0x1B 0x08⌘←Delete | send hex code | 0x15Don't forget the amazing icons ⌘ = command and ⌥ = options/alt (why oh why?).