Note: Keys specific to Mac, but concepts global (Win/Linux/etc)
The key, for the keys...
Note: Unicode characters used here are not necessarily the accepted standard (I was in a hurry.)
Want to swap development databases? Sick of dropping, migrating and setting up databases when swtiching branches? This ⚡️ talk's for you!
The sections Configuring a Database and Connection Preference in the Rails Guides explains that there are two ways to configure your DB.
# Uncompressed | |
pg_dump dbname | |
psql dbname < infile | |
# Compressed | |
pg_dump dbname | gzip > filename.gz | |
gunzip -c filename.gz | psql dbname |
[ | |
{ | |
"keys": ["super+alt+r"], "command": "goto_definition" | |
}, | |
// Select last tab in group | |
// NOTE: Requires "Chain of Command" package for "chain" command | |
{ | |
"keys": ["super+9"], | |
"command": "chain", | |
"args": { |
So, you love Slack, but you hate applications with large white backgrounds? Why not use Dark Mode! 🕶️
Unfortunately, Slack does not have a Dark Mode, although it's on their list of possibilities.
But, don't fret - there is a solution! Because the slack native desktop apps are just wrappers around a web app, we can inject our own CSS to customize the application to our liking.
(I take no credit for this exploit, graciously found via @DrewML https://gist.github.com/DrewML/0acd2e389492e7d9d6be63386d75dd99 and suggestions by @bradens, @jouni, @gkostov and others).
a .dense_meta.msg_inline_file_preview_toggler .msg_inline_file_preview_title, .dense_meta.msg_inline_img_toggler .msg_inline_file_preview_title, .meta.msg_inline_file_preview_toggler .msg_inline_file_preview_title, .meta.msg_inline_img_toggler .msg_inline_file_preview_title, | |
.dense_meta.msg_inline_file_preview_toggler .msg_inline_file_preview_title, .dense_meta.msg_inline_img_toggler .msg_inline_file_preview_title, .meta.msg_inline_file_preview_toggler .msg_inline_file_preview_title, .meta.msg_inline_img_toggler .msg_inline_file_preview_title { | |
color: #66FFFF !important; | |
/* color: #80FF00 !important; */ | |
/* text-decoration: underline !important; */ | |
} | |
a:active, a:focus, a:hover { | |
color: #66CCFF !important; |
System Preferences > General > Use dark menu bar and Dock
See if your menu bar icons can be switched to black, so they appear white for dark menu bar, most apps have an option in settings.
#!/usr/bin/env ruby | |
require 'active_support' | |
require 'active_support/core_ext' | |
require 'thor' | |
# Usage: | |
# ./slack-dark.rb | |
# ./slack-dark.rb [NEW_INDEX_FILE] | |
# |
#!/usr/bin/env ruby | |
require 'ruby-progressbar' | |
commands = [ | |
{ | |
description: 'changing into Centro Direct directory', | |
command: 'cd ~/dev/centro-media-manager/' | |
}, | |
{ |
Using the gem zero_downtime_migrations
A simple example is adding a migration such as adding a column with a defalut value: zero_downtime_migrations
README#Adding a Column with a Default with default: true
for a :boolean
column:
class AddDefaultToCampaignsTestingZDM < ActiveRecord::Migration
def change
add_column :direct_campaigns, :zero_migration_test, :boolean, default: true