Magic words:
psql -U postgresIf run with -E flag, it will describe the underlaying queries of the \ commands (cool for learning!).
Most \d commands support additional param of __schema__.name__ and accept wildcards like *.*
| #chat-box.ubuntu.hidden-xs | |
| .closed | |
| .pull-right | |
| = link_to_function content_tag(:i, nil, class: 'glyphicon glyphicon-chevron-up').html_safe, 'chat.show()' | |
| .m-l-small | |
| = link_to_function 'Chat with us', 'chat.show()' | |
| .opened{style: 'display: none'} | |
| .header | |
| .pull-right | |
| = link_to_function content_tag(:i, nil, class: 'glyphicon glyphicon-plus-sign').html_safe, 'chat.maximize()', class: 'maximize', style: 'display: none' |
| Parisoma @ 11th & Howard | |
| http://www.parisoma.com/startups/#dedicated | |
| $595 | |
| Sandbox Suites @ 10th & Mission | |
| http://www.sandboxsuites.com/coworking/ | |
| $495, $595 (skybox) | |
| Hub @ 5th & Mission | |
| https://bayarea.impacthub.net/join-us/ |
| # Word and Character Count service for Mac OS X | |
| # Adds a Word and Character Count option to the text selection context menu | |
| # Use Automator.app to create a new service, and then select the Run AppleScript | |
| # action. Paste in this code and save as Word and Character Count. Now switch to | |
| # a new app, select some text, and open the context menu to find the new option. | |
| # Copyright 2012, Noah Slater <nslater@apache.org> | |
| #!/usr/bin/env ruby | |
| require 'rubygems' | |
| require 'aws-sdk' | |
| s3 = AWS::S3.new( | |
| :access_key_id => 'PASTE_HERE', | |
| #### SECRET KEY ##### | |
| :secret_access_key => 'PASTE_SECRET_KEY_HERE') | |
| #### DO NOT COMMIT #### |
| # 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 |
An introduction to curl using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
Includes HTTP-Header information in the output
| #!/bin/bash | |
| # | |
| # Initial script to create users when launching an Ubuntu server EC2 instance | |
| # | |
| declare -A USERKEY | |
| # | |
| # Create one entry for every user who needs access. Be sure to change the key to their |
| # Original source: https://gist.github.com/hopsoft/56ba6f55fe48ad7f8b90 | |
| # Merged with: https://gist.github.com/kofronpi/37130f5ed670465b1fe2d170f754f8c6 | |
| # Benefits of: https://gist.github.com/e12e/e0c7d2cc1d30d18c8050b309a43450ac | |
| # And fixes of: https://gist.github.com/joelvh/f50b8462611573cf9015e17d491a8a92 | |
| namespace :db do | |
| desc 'Dumps the database to backups' | |
| task dump: :environment do | |
| dump_fmt = ensure_format(ENV['format']) | |
| dump_sfx = suffix_for_format(dump_fmt) | |
| backup_dir = backup_directory(Rails.env, create: true) |