Skip to content

Instantly share code, notes, and snippets.

View johnpitchko's full-sized avatar
🏠
Working from home

John Pitchko johnpitchko

🏠
Working from home
  • Chord Commerce
  • Calgary, AB, Canada
  • 07:14 (UTC -06:00)
  • LinkedIn in/johnpitchko
View GitHub Profile
@bartlomiejdanek
bartlomiejdanek / .irbrc
Created December 20, 2011 19:23
IRB configuration
# Make gems available
require 'rubygems' if RUBY_VERSION <= '1.9.0'
# http://drnicutilities.rubyforge.org/map_by_method/
require 'map_by_method'
# Dr Nic's gem inspired by
# http://redhanded.hobix.com/inspect/stickItInYourIrbrcMethodfinder.html
require 'what_methods'
@willnet
willnet / gist:4128828
Created November 22, 2012 01:05
attributes custom matcher for minitest
# -*- coding: utf-8 -*-
class EqualAttributesMatcher
def initialize(attrs)
@attrs = attrs
end
def matches?(model)
@model = model
@attrs.all? { |k,v| @model.send(k) == v }
end
@spinscale
spinscale / readme.md
Created July 24, 2014 07:07
Using iTerm2 notification capabilities

Notification of finished builds in iTerm2

iTerm2 has a neat feature called a trigger, which you can use to notify you about finished maven builds (failure or success) or anything else happening in your console.

Install terminal notifier

brew install terminal-notifier
@Phlow
Phlow / for-loop-sorted-collection
Last active December 8, 2023 07:28
This Liquid loop for Jekyll sorts a collection by date in reverse order
{% comment %}
*
* This loop loops through a collection called `collection_name`
* and sorts it by the front matter variable `date` and than filters
* the collection with `reverse` in reverse order
*
* To make it work you first have to assign the data to a new string
* called `sorted`.
*
{% endcomment %}
@nimf
nimf / build-notifier.rb
Last active July 3, 2018 13:49 — forked from zoul/build-notifier.rb
Posts a message to the OS X notification center when a Jekyll build is finished. Requires TerminalNotifier, see http://git.io/5X99Eg or “gem install terminal-notifier”.
begin
require 'terminal-notifier'
module Jekyll
class Site
alias jekyll_process process
def process
jekyll_process
TerminalNotifier.notify("🍻 Jekyll rebuild finished")
rescue => e
TerminalNotifier.notify("💥 Jekyll rebuild failed: #{e.message}")
@dakanji
dakanji / Install_USB_Maker.sh
Last active April 10, 2024 23:39
Creates Bootable USB for Mac OS Lion to Monterey (Excluding Mavericks)
#!/usr/bin/env bash
# Install_USB_Maker.sh
# Copyright (c) 2020 - 2023 Dayo Akanji
# - dakanji@users.sourceforge.net
# Portions Copyright (c) Jeff Geerling
# - https://github.com/geerlingguy/macos-virtualbox-vm/blob/master/LICENSE
#
# MIT License