Skip to content

Instantly share code, notes, and snippets.

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

Joaquin Menchaca darkn3rd

🏠
Working from home
View GitHub Profile
@darkn3rd
darkn3rd / rspec_cheatsheet_for_zombies.markdown
Created June 3, 2018 06:49 — forked from luislee818/rspec_cheatsheet_for_zombies.markdown
Cheat sheet for RSpec based on CodeSchool's "Testing with RSpec" course

Introduction

Vocabulary

Examples are decalred using the it method
Assertions are called Expectations
should and should_not are called Modifiers
Matchers are the operators in the assertions (==, >, be_true, etc.)

Install RSpec

@darkn3rd
darkn3rd / chefdk-rvm.sh
Created November 20, 2017 06:27 — forked from asnodgrass/chefdk-rvm.sh
Making ChefDK work with RVM
# Assumption: Mac OS X
CHEFDK="/opt/chefdk/embedded"
CHEFDK_USER="$HOME/.chefdk/gem/ruby/2.1.0"
RVM_GEMS="$HOME/.rvm/gems"
RVM_RUBIES="$HOME/.rvm/rubies"
RUBY_NAME="ext-chefdk-ruby"
mkdir -p $RVM_RUBIES/$RUBY_NAME
ln -s $CHEFDK/bin $RVM_RUBIES/$RUBY_NAME
@darkn3rd
darkn3rd / expecting.md
Created February 19, 2017 07:13 — forked from ksafranski/expecting.md
Basic principles of using tcl-expect scripts

Intro

TCL-Expect scripts are an amazingly easy way to script out laborious tasks in the shell when you need to be interactive with the console. Think of them as a "macro" or way to programmaticly step through a process you would run by hand. They are similar to shell scripts but utilize the .tcl extension and a different #! call.

Setup Your Script

The first step, similar to writing a bash script, is to tell the script what it's executing under. For expect we use the following:

#!/usr/bin/expect
@darkn3rd
darkn3rd / osx_automount_nfs.md
Last active August 29, 2015 14:27 — forked from L422Y/osx_automount_nfs.md
Automounting NFS share in OS X into /Volumes

I have spent quite a bit of time figuring out automounts of NFS shares in OS X...

Somewhere along the line, Apple decided allowing mounts directly into /Volumes should not be possible:

/etc/auto_master (see last line):

#
# Automounter master map
#

+auto_master # Use directory service