Skip to content

Instantly share code, notes, and snippets.

@cooljl31
cooljl31 / frontendDevlopmentBookmarks.md
Created October 10, 2016 19:46 — forked from dypsilon/frontendDevlopmentBookmarks.md
A badass list of frontend development resources I collected over time.
@cooljl31
cooljl31 / doc.md
Created December 6, 2016 00:05 — forked from oelmekki/doc.md
Rails + Browserify + React + es7

1. Gemfile

gem 'browserify-rails', '1.5.0' # until fix: https://github.com/browserify-rails/browserify-rails/issues/101
gem 'react-rails'

Browserify-rails allows to use browserify within assets pipeline. React-rails is here only to allow to use #react_component (and thus, prerendering).

Note that jquery-rails can be removed from Gemfile, the npm version of jquery and jquery-ujs will be used instead.

@cooljl31
cooljl31 / rspec_rails_cheetsheet.rb
Created March 7, 2017 10:10 — forked from them0nk/rspec_rails_cheetsheet.rb
Rspec Rails cheatsheet (include capybara matchers)
#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)
@cooljl31
cooljl31 / bootstrap-navbar.slim
Created March 17, 2017 10:59 — forked from rex/bootstrap-navbar.slim
Default Twitter Bootstrap nav bar, in the Slim templating language
nav.navbar.navbar-default role="navigation"
.container-fluid
/! Brand and toggle get grouped for better mobile display
.navbar-header
button.navbar-toggle data-target="#bs-example-navbar-collapse-1" data-toggle="collapse" type="button"
span.sr-only Toggle navigation
span.icon-bar
span.icon-bar
span.icon-bar
a.navbar-brand href="#" Brand
@cooljl31
cooljl31 / capybara cheat sheet
Created March 20, 2017 09:01 — forked from zhengjia/capybara cheat sheet
capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')
@cooljl31
cooljl31 / .gitconfig
Created April 1, 2017 12:35 — forked from pksunkara/config
Sample of git config file (Example .gitconfig)
[user]
name = Pavan Kumar Sunkara
email = pavan.sss1991@gmail.com
[core]
editor = vim
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
excludesfile = ~/.gitignore
[sendemail]
smtpencryption = tls
smtpserver = smtp.gmail.com
@cooljl31
cooljl31 / hack.sh
Created April 3, 2017 20:13 — forked from mbinna/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2357277/hack.sh | sh
#
@cooljl31
cooljl31 / capybara.md
Created April 4, 2017 13:31 — forked from steveclarke/capybara.md
RSpec Matchers

Capybara

save_and_open_page

Matchers

have_button(locator)
@cooljl31
cooljl31 / digital_ocean_setup.md
Created April 14, 2017 09:09 — forked from ChuckJHardy/digital_ocean_setup.md
DigitalOcean Ubuntu 14.04 x64 + Rails 4 + Nginx + Unicorn + PostgreSQL + Capistrano 3 Setup Instructions

DigitalOcean Ubuntu 14.04 x64 + Rails 4 + Nginx + Unicorn + PostgreSQL + Capistrano 3

SSH into Root

$ ssh root@123.123.123.123

Change Root Password