Skip to content

Instantly share code, notes, and snippets.

View devonzuegel's full-sized avatar
💖
I've gone to look for myself. If I return before I'm back, please ask me to wait

Devon Zuegel devonzuegel

💖
I've gone to look for myself. If I return before I'm back, please ask me to wait
View GitHub Profile
@devonzuegel
devonzuegel / .zshrc
Last active August 29, 2015 14:17
My .zshrc aliases
#
# Executes commands at the start of an interactive session.
#
if [[ -s "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" ]]; then
source "${ZDOTDIR:-$HOME}/.zprezto/init.zsh"
fi
for config_file ($HOME/.yadr/zsh/*.zsh) source $config_file
@devonzuegel
devonzuegel / MultiMarkdown.sublime-settings
Last active August 29, 2015 14:17
MultiMarkdown settings
{
"extensions":
[
"md",
"mdown",
"mdwn",
"mmd",
"txt",
"md"
],
@devonzuegel
devonzuegel / rails-notes.md
Created March 26, 2015 09:24
A collection of shortcuts and concepts I've learned the hard way and don't want to forget

Useful things to know about Rails

Command line utilities

Viewing your models:

$ rails console		// open up the Rails console

2.1.5 (main):0 > show-models		// show all models
{
"color_scheme": "Packages/Theme - itg.flat/itg.dark.tmTheme",
"draw_centered": true,
"extensions":
[
"mmd",
"md",
"md"
],
"indentation": 4,
@devonzuegel
devonzuegel / example.js.coffee
Last active August 29, 2015 14:24
Simplifying jsx markup
{ div, h1, h2, h3, h4, h5, h6, p, a } = React.DOM
@Entry = React.createClass
render: ->
div className: 'col-md-6 no-padding',
div className: 'entry-card',
div className: 'fade'
div null,
h2 null, @props.entry.title
@devonzuegel
devonzuegel / pre-commit.rb
Created July 11, 2015 06:33
pre-* git scripts
#!/usr/bin/env ruby
require 'pty'
require 'colorize'
require 'tempfile'
def system_stdout(cmd)
system('touch tempfile')
system("script -q /dev/null #{cmd} | tee tempfile")
output = File.readlines 'tempfile'
@devonzuegel
devonzuegel / .pryrc
Last active June 13, 2024 19:43
My .pryrc file
# === EDITOR ===
Pry.editor = 'vi'
require 'awesome_print'
# == Pry-Nav - Using pry as a debugger ==
Pry.commands.alias_command 'c', 'continue' rescue nil
Pry.commands.alias_command 's', 'step' rescue nil
Pry.commands.alias_command 'n', 'next' rescue nil
# === CUSTOM PROMPT ===
@devonzuegel
devonzuegel / formatted_table.rb
Last active September 15, 2015 22:12
Pretty prints a 2D array with or without a header
require 'colorize'
def print_table(table, with_header = true)
# Calculate widths
widths = []
table.each do |line|
line.each_with_index do |col, c|
widths[c] = (widths[c] && widths[c] > col.length) ? widths[c] : col.length
end
end
{
"bold_folder_labels": false,
"color_scheme": "Packages/color-themes/pisco-sour.tmTheme",
"fade_fold_buttons": false,
"file_exclude_patterns":
[
"*.pyc",
"*.pyo",
"*.exe",
"*.dll",
{
"color_scheme": "Packages/User/Color Highlighter/themes/pisco-sour.tmTheme",
"draw_centered": true,
"extensions":
[
"mmd",
"md",
"md"
],
"highlight_line": true,