Skip to content

Instantly share code, notes, and snippets.

View madcato's full-sized avatar
🪲
Building future bugs!!

Dani Vela madcato

🪲
Building future bugs!!
View GitHub Profile
@madcato
madcato / gist:a713fffa732d32a52dbc777b7791b885
Created February 22, 2021 11:16 — forked from itsmattsoria/gistfil1.textile
Mac Terminal Cheat Sheet

SHORTCUTS

Key/Command Description
Tab Auto-complete files and folder names
Ctrl + A Go to the beginning of the line you are currently typing on
Ctrl + E Go to the end of the line you are currently typing on
Ctrl + U Clear the line before the cursor
Ctrl + K Clear the line after the cursor
Ctrl + W Delete the word before the cursor
Ctrl + T Swap the last two characters before the cursor
@madcato
madcato / Rakefile
Created December 26, 2017 12:18 — forked from schickling/Rakefile
Activerecord without Rails
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)