Skip to content

Instantly share code, notes, and snippets.

sk187 /
Last active Apr 4, 2016
Floor vs Float Point Division in Python 3
# Floating Point Division
231871064940156750 / 5
# => 4.637421298803135e+16
# Turn the result into a integer
# => 46374212988031352
# Floor Division
231871064940156750 // 5
# => 46374212988031350
sk187 / Gemfile
Last active Feb 28, 2016 — forked from caseywatts/Gemfile
Sinatra on Cloud9
View Gemfile
source ''
gem 'sinatra'
gem 'sinatra-contrib'
gem 'json'
sk187 / fizzbuzz.rb
Last active Feb 28, 2016
fizzbuzz Challenge
View fizzbuzz.rb
def fizzbuzz(x)
# your
# code
# goes
# here
puts "(change me I am a placeholder string)"
sk187 /
Created Dec 25, 2015
raspberry pi console usb
screen /dev/cu.usbserial 115200
sk187 / rubocoprvm.cson
Last active Jan 14, 2016
config.cson for rubocop rvm
View rubocoprvm.cson
# This is what your probably have
command: "/Users/sungkim/.rvm/gems/ruby-2.2.3/bin/rubocop"
# This is what you should have
# Notice that the bin was changed to wrapper
command: "/Users/sungkim/.rvm/gems/ruby-2.2.3/wrappers/rubocop"
# The first line will get all hidden folders and Files to be shown
# The second line will close and reopen Finder windows so the changes will
# take effect.
defaults write AppleShowAllFiles YES
killall Finder
# To hide the files/folders once more
defaults write AppleShowAllFiles NO
killall Finder
View regex-weburl.js
// Regular Expression for URL validation
// Author: Diego Perini
// Updated: 2010/12/05
// License: MIT
// Copyright (c) 2010-2013 Diego Perini (
// Permission is hereby granted, free of charge, to any person
# Into your temrminal type
which ruby # This will give you the path to where ruby is installed if installed
ruby -v # This will give you the version of ruby you currently have installed
# You can check just about any other program in the same fashion
which git
git -v
brew install git # This will install the latest version of Git into your Homebrew Cellar
# First type this into your terminal. *You must already have homebrew installed
brew install ruby
# After installing ruby, we need to edit the path on your computer so it uses
# the new installation of ruby and not the one packaged with your computer.
# Type the following into your terminal to edit the paths with VIM
sudo vi /etc/paths
# It will ask for your password (the one you used to login / install programs)
# Just type it in and press enter *You will not see anything but you are entering something I promise.