Skip to content

Instantly share code, notes, and snippets.

View chriskk's full-sized avatar
🤙

Chris Kobayashi chriskk

🤙
  • ATTAIN
  • San Francisco, CA
View GitHub Profile
@chriskk
chriskk / podforceupdate.sh
Created November 5, 2019 00:54 — forked from mbinna/podforceupdate.sh
Clear CocoaPods cache, re-download and re-install all pods
#!/usr/bin/env bash
rm -rf "${HOME}/Library/Caches/CocoaPods"
rm -rf "`pwd`/Pods/"
pod update
# This is a skeleton for testing models including examples of validations, callbacks,
# scopes, instance & class methods, associations, and more.
# Pick and choose what you want, as all models don't NEED to be tested at this depth.
#
# I'm always eager to hear new tips & suggestions as I'm still new to testing,
# so if you have any, please share!
#
# @kyletcarlson
#
# This skeleton also assumes you're using the following gems:
#Model
@user.should have(1).error_on(:username) # Checks whether there is an error in username
@user.errors[:username].should include("can't be blank") # check for the error message
#Rendering
response.should render_template(:index)
#Redirecting
response.should redirect_to(movies_path)
@chriskk
chriskk / gist:5603529
Last active December 17, 2015 11:39 — forked from olistik/gist:2627011

Ubuntu 12.10 setup (RVM, PostgreSQL)

Basic pre-requisites

  • Some utilities:
sudo apt-get install vim git curl
sudo add-apt-repository ppa:webupd8team/sublime-text-2;
sudo apt-get update;
sudo apt-get install sublime-text
sudo ln -s /usr/lib/sublime-text-2/sublime_text /usr/local/bin/sublime
@chriskk
chriskk / memcache.rb
Created July 24, 2012 08:55 — forked from bkimble/gist:1365005
Command line tool to list memcache keys and to get the value of a specific key
#!/usr/bin/env ruby
require 'net/telnet'
require 'lib/trollop'
opts = Trollop::options do
banner <<-EOS
Command line tool to list memcache keys and to get the value of a specific key
Usage:
memcache [options]