Skip to content

Instantly share code, notes, and snippets.

View dohoonk's full-sized avatar
🎯
Focusing

Tony(Dohoon) Kim dohoonk

🎯
Focusing
View GitHub Profile
@dohoonk
dohoonk / CodecoreBoot4.md
Last active March 10, 2016 06:06
Edditing in Git/Final Project/Taste of Node Js/Mongo db

#Peer review in Git Reset the master in history and make a pull request

look at the code and add comments

git reset example --hard git log git push -f origin master

review and add comments on the code

@dohoonk
dohoonk / CodecoreBoot3.md
Last active March 9, 2016 00:19
Debugging

#Steps to debug 1.Read the error message multiple times Where do I find the message? Read and Read and Read

2.Google the error message copy and paste to google the error msg

3.User tools Railslogger

@dohoonk
dohoonk / Gem Collection
Last active March 15, 2016 21:03
Collection of useful Gems
gem "cocoon"
gem 'kaminari'
gem 'bootstrap-kaminari-views'
gem 'cancancan'
gem 'friendly_id', '~> 5.1.0'
gem 'delayed_job_active_record'
gem 'delayed_job_web'
gem 'quiet_assets'
gem 'font-awesome-rails'
gem 'simple_form'
@dohoonk
dohoonk / CodecoreBoot2.md
Last active March 8, 2016 18:49
Signing in with Twitter API/

Omniauth GEM

apps.twitter.com

in the twitter create an app

in the required url http://127.0.0.1:3000/ or lvh.me:3000

@dohoonk
dohoonk / CodecoreBoot.md
Created March 7, 2016 19:51
Building API/Faraday

#Api vesion control

-bin/rails g controller api/v1/questions

will generate api folder and v1


faraday gem can mimic http request

@dohoonk
dohoonk / day40.md
Created March 7, 2016 07:35
BootCamp

Big O notation

Binary Search is often offered as divide and conquer as the approach is often to take the middle and compare the values at that point. If the desired value does is greater than what is being compared you would ignore the first half of the values and take the last half and divide tht by half.

Recursion

@dohoonk
dohoonk / CodecoreBoot5.md
Last active March 9, 2016 17:32
Navigating in Git

how to see branches git branch -v

how to build a brench git checkout -b intergration

git status on branch integration

git checkout -b

gem 'simple_form'

-to work with bootstrap

rails generate simple_form:install --bootstrap

app/assets/stylesheets/bootstrap_and_overrides.scss @import "bootstrap-sprockets"; @import "bootstrap"

Rspec.feature "Campaigns", type: :feature do
describe "Campaigns Listing" do
it "displays a text 'Recent Campaigns'" do
#this simulates users typing the 'campaign_path' in the address bar
#to actually visit the page
visit campaigns_path
# we have acess to an object 'page' that contains the rendered HTML page
# we can use it with RSpec Matchers to perform tests
expect(page).to have text "Recent Campaigns"
end

DOM

var filter = function(array, fn) {
  var result = [];
  arr.forEach(function(){
    if(fn(element)){
      result.push(element);  
 }