Skip to content

Instantly share code, notes, and snippets.

View mswieboda's full-sized avatar

Matt Swieboda mswieboda

View GitHub Profile
@mswieboda
mswieboda / LightningKeys.md
Last active December 3, 2015 19:20
Lightning Keys

Lightning Keys (⚡️⌨)

Note: Keys specific to Mac, but concepts global (Win/Linux/etc)

Jim Carrey Lightning Fast Keyboard

Key

The key, for the keys...

Note: Unicode characters used here are not necessarily the accepted standard (I was in a hurry.)

@mswieboda
mswieboda / AltDBs.md
Last active October 14, 2016 19:52
Swap Rails development DBs with DATABASE_URL

Alt DBs ⚡️ Talk

Uses

Want to swap development databases? Sick of dropping, migrating and setting up databases when swtiching branches? This ⚡️ talk's for you!

Database Config Options

The sections Configuring a Database and Connection Preference in the Rails Guides explains that there are two ways to configure your DB.

@mswieboda
mswieboda / psql-dump.sh
Last active January 27, 2017 19:35
PSQL Dump and Reload
# Uncompressed
pg_dump dbname
psql dbname < infile
# Compressed
pg_dump dbname | gzip > filename.gz
gunzip -c filename.gz | psql dbname
@mswieboda
mswieboda / Custom.sublime-keymap
Created February 7, 2017 19:48
Custom Sublime Key bindings
[
{
"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": {
@mswieboda
mswieboda / Theming-Slack-OSX.md
Last active December 3, 2017 23:45 — forked from DrewML/Theming-Slack-OSX.md
Theming Slack for OSX 🕶️

Theming Slack for OSX

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).

@mswieboda
mswieboda / slack-dark-h4x0r-theme.css
Last active June 27, 2017 21:39 — forked from bradens/slack-dark-theme.css
Dark h4x0r Slack Theme
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;
@mswieboda
mswieboda / osx-dark-mode-everything.md
Last active May 5, 2017 15:48
OS X Dark Mode Everything 🕶️ 🏴

OS X Dark Mode Everything 🕶️ 🏴

OS X Dark Menu Bar and Dock

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.

Chrome Extensions

@mswieboda
mswieboda / slack-dark.rb
Last active May 30, 2017 18:41
Script to copy custom Slack index.js when it gets updated and changes overridden
#!/usr/bin/env ruby
require 'active_support'
require 'active_support/core_ext'
require 'thor'
# Usage:
# ./slack-dark.rb
# ./slack-dark.rb [NEW_INDEX_FILE]
#
@mswieboda
mswieboda / ruby-progressbar-example.rb
Created June 5, 2017 16:10
Using ruby-progressbar for long command line tasks
#!/usr/bin/env ruby
require 'ruby-progressbar'
commands = [
{
description: 'changing into Centro Direct directory',
command: 'cd ~/dev/centro-media-manager/'
},
{
@mswieboda
mswieboda / AZDMG.md
Created August 9, 2017 16:52
Adding Zero Downtime Migrations Gem AzDMG