This file contains 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
# lib/tasks/load_tasks.rake | |
# ------------ | |
# Looks at every .rb file in the lib/tasks and adds them to rake within the | |
# namespace of their subdirectories | |
# ------------ | |
# Important to note we are looking specifically for .rb files, so they | |
# aren't added to the global rake namespace | |
Dir.glob("#{Rails.root}/lib/tasks/**/*.rb").each do |file| |
This file contains 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
require 'fileutils' | |
path = File.expand_path('../', __FILE__) | |
Dir.glob("#{path}/**/*.*").each do |file| | |
new_path = "#{path}/#{file.split('/')[-1]}" | |
FileUtils.mv(file, new_path) | |
end |
This file contains 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
# Assumes: | |
# - curl is installed | |
# - you have a slack channel with an incoming webhook configured | |
require 'json' | |
def notify_slack(webhook_url, channel, username, text, image) | |
payload = { | |
:channel => channel, | |
:username => username, |
This file contains 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
# Path to your oh-my-zsh configuration. | |
ZSH=$HOME/.oh-my-zsh | |
# Set name of the theme to load. | |
# Look in ~/.oh-my-zsh/themes/ | |
# Optionally, if you set this to "random", it'll load a random theme each | |
# time that oh-my-zsh is loaded. | |
# ZSH_THEME="alanpeabody" | |
# Example aliases |
OlderNewer