Skip to content

Instantly share code, notes, and snippets.

View ivanoats's full-sized avatar
💭
🤙 Stoked 🏄‍♂️

Ivan Storck ivanoats

💭
🤙 Stoked 🏄‍♂️
View GitHub Profile
@ivanoats
ivanoats / 0_reuse_code.js
Created February 23, 2014 19:20
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@ivanoats
ivanoats / promise.js
Created February 20, 2014 23:45 — forked from dhable/promise.js
function promise() {
var listeners = [],
resolved = false,
data;
return {
isResolved: function() {
return resolved;
},
# .railsrc
-B #Skip Bundle
-T #Skip Test-Unit
-d postgresql #Use postgres

Bento, a project by the same company that makes Chef, is a Packer-based project for building base boxes. Unlike http://vagrantbox.es, Bento just uses base operating systems from the manufacturers with no pre-installed software. All the boxes are hosted on S3 in the following format:

https://opscode-vm-bento.s3.amazonaws.com/vagrant/PROVIDER/opscode_OS-VERSION_chef-provisionerless.box

For example, Ubuntu 13.04 lives here for VirtualBox:

https://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_ubuntu-13.04_chef-provisionerless.box

And the VMWare equivalent box lives:

@ivanoats
ivanoats / delete_post_test.rb
Created October 11, 2013 00:06
better way to delete scaffold post
require "test_helper"
feature "PostDelete" do
scenario "can delete a post" do
@only = posts(:post_brand_new).id
#Given I have a existing post
visit posts_path

Welcome Aboard

Welcome to your Code Fellows Ruby on Rails Bootcamp! We are honored you have set aside 8 weeks to be with us. Your commitment and trust means the world to us. Are you ready to dive in and work hard?

Our Teaching Philosophy

At Code Fellows, a large part of what we do is shaped by our promise to help you find a job. When we talk to hiring managers, the overwhelming message is that coders don't usually get taught the professional skills necessary to perform well in a team. Even Computer Science majors are not prepared for what it's like to work in a high-achieving group of professional software developers with industry experience.

For this class, we create a simulation of how real software professionals develop applications. First, we introduce you to the professional toolchain for Ruby on Rails: the set of programs and libraries, that we combine together and craft quality applications that deliver business value. Secondly, we give you a sandbox t

=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')
var refreshDb = function(done) {
spawn(neo4j, ['stop']).on('exit', function() {
spawn('rm', ['-rf', datapath]).on('exit', function() {
spawn('mkdir', ['-p', datapath]).on('exit', function() {
updateConf(TEST_INSTANCE_PORT, function() {
var n = spawn(neo4j, ['start'])
n.stdout.on('data', function(d) {
process.stdout.write(d.toString());
})
n.on('exit', function() {
site :opscode
cookbook 'apt'
cookbook 'build-essential'
cookbook 'apache2'
cookbook 'postgresql'
cookbook 'rvm', git: "https://github.com/fnichol/chef-rvm.git"
def screenshot
require 'capybara/util/save_and_open_page'
now = Time.now
p = "/#{now.strftime('%Y-%m-%d-%H-%M-%S')}-#{rand}"
Capybara.save_page body, "#{p}.html"
path = Rails.root.join("#{Capybara.save_and_open_page_path}" "#{p}.png").to_s
page.driver.render path
Launchy.open path
end