Skip to content

Instantly share code, notes, and snippets.

@tjmcewan
tjmcewan / slack.sh
Created July 18, 2021 11:01 — forked from andkirby/slack.sh
Shell/Bash script for sending slack messages.
#!/usr/bin/env bash
####################################################################################
# Slack Bash console script for sending messages.
####################################################################################
# Installation
# $ curl -s https://gist.githubusercontent.com/andkirby/67a774513215d7ba06384186dd441d9e/raw --output /usr/bin/slack
# $ chmod +x /usr/bin/slack
####################################################################################
# USAGE
# Send message to slack channel/user
@tjmcewan
tjmcewan / snakify.rb
Last active August 29, 2015 13:57 — forked from puyo/encamel.rb
#!/usr/bin/env ruby
gem 'activesupport'
require 'active_support/core_ext/string/inflections'
camel = ARGV.first
snake = camel.underscore
system %{git grep -l #{camel} | xargs ruby -p -i -e '$_.gsub! /#{camel}/, "#{snake}"'}
# !/usr/bin/env ruby
#
# A pre-commit hook to test if jammit needs to be run
# In case you don't like on the fly stuff
require 'rubygems'
require "bundler"
Bundler.setup
require 'jammit'