Skip to content

Instantly share code, notes, and snippets.

View yock's full-sized avatar

Michael Yockey yock

View GitHub Profile
#
# After a discussion about the cool groovy syntax for
# declaring anonymous classes. Jim Weirich and I came up
# with the following solutions in Ruby.
#
# Requires: Ruby 1.9
#
def run(x)
x.foo
end
Given(:stack) { a_stack_with_one_item }
When { stack.pop }
Then { stack.empty? }
@mutewinter
mutewinter / gifify.sh
Last active December 25, 2015 12:29 — forked from SlexAxton/.zshrc
# Sweet Gif Creation from .mov
#
# Adapted from https://gist.github.com/SlexAxton/4989674
gifify() {
if [[ -n "$1" ]]; then
GIF="${1%.*}.gif"
if [[ $2 == '--bad' ]]; then
ffmpeg -i $1 -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > $GIF
else
ffmpeg -i $1 -r 10 -vcodec png out-static-%05d.png
@dustinfarris
dustinfarris / circle.yml
Last active February 14, 2017 19:48
CircleCI script for Ember-CLI projects
machine:
node:
version: 0.10.28
dependencies:
pre:
- npm install -g bower
override:
- npm i
- bower i
deployment:
@tristanoneil
tristanoneil / harvest
Created October 24, 2013 13:37
How to override Harvest for Mac time settings.
For AppStore apps:
defaults write com.getharvest.harvestxapp TimeFormat hours_minutes
defaults write com.getharvest.harvestxapp TimeFormat decimal
defaults write com.getharvest.harvestxapp TimeFormat server
For apps downloaded directly from GetHarvest:
defaults write ~/Library/Preferences/com.getharvest.harvestx.plist TimeFormat hours_minutes
defaults write ~/Library/Preferences/com.getharvest.harvestx.plist TimeFormat decimal
@cromwellryan
cromwellryan / git-merge-ff-only.sh
Last active July 12, 2018 13:43
Code for Git-Poooosh post
$> git merge --ff-only fancy-feature-branch
Updating 020fbbd..0d154e9
Fast-forward
README.md | 2 ++
1 file changed, 2 insertions(+)
#Sort the Ruby files in your project by LOC
find . -iname "*.rb" -type f -exec wc -l {} \; | sort -rn
@dabrahams
dabrahams / gist:3030332
Created July 2, 2012 01:10
My new, simpler offlineimap configuration
# -*- mode: conf; -*-
#
# NOTE: Settings generally support python interpolation. This means
# values can contain python format strings which refer to other values
# in the same section, or values in a special DEFAULT section. This
# allows you for example to use common settings for multiple accounts:
#
# [Repository Gmail1]
# trashfolder: %(gmailtrashfolder)s
#
@jandudulski
jandudulski / auth.rb
Last active September 14, 2022 12:09
CSRF on Grape
# based on http://api.rubyonrails.org/classes/ActionController/RequestForgeryProtection.html
module Auth
extend ActiveSupport::Concern
included do
helpers do
def session
env['rack.session']
end

I bundled these up into groups and wrote some thoughts about why I ask them!

If these helped you, I'd love to hear about it!! I'm on twitter @vcarl_ or send me an email carl.vitullo@gmail.com

Onboarding and the workplace

https://blog.vcarl.com/interview-questions-onboarding-workplace/

  • How long will it take to deploy my first change? To become productive? To understand the codebase?
  • What kind of equipment will I be provided? Will the company pay/reimburse me if I want something specific?