This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# remap git to point to g() | |
git () { | |
g "$@" | |
} | |
# git super command | |
# make sure with zsh that the git plugin is not used | |
# as it will override this command | |
g () { | |
if [[ $# -gt 0 ]] |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# frozen_string_literal: true | |
require 'bundler/inline' | |
gemfile do | |
source 'https://rubygems.org' | |
gem 'colorize' | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require "colorize" | |
def wow_name(string) | |
fits = string.size <= 12 | |
if fits | |
"=> \"#{string.downcase.capitalize}\" fits and would make a great name! β ".green | |
else | |
# cutoff = string[0...12] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# full path to a custom icns file | |
CUSTOM_ICNS = false | |
CUSTOM_ICNS_FILE = "" | |
require "colorize" | |
require "optparse" | |
def options |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# All credit to Dave Brady & his RSpec-Junklet Project that changed how I think about test data. | |
# * https://rubygems.org/profiles/dbrady | |
# Place in rspec/support/junklet.rb and have the rails_helper.rb load it | |
# Returns randomized data for when we don't care *what* the data is. | |
def junk(length = 32) | |
# hex returns length*2 digits, because it returns a 0..255 byte | |
# as a hex pair. But when we want junk, we want *bytes* of | |
# junk. Get (length+1)/2 chars, which will be correct for even | |
# sizes and 1 char too many for odds, so trim off with [0...length] |
OlderNewer