Skip to content

Instantly share code, notes, and snippets.

View ninabreznik's full-sized avatar
🐝
Building the future

Nina Breznik ninabreznik

🐝
Building the future
View GitHub Profile
source 'https://rubygems.org'
# Provides basic authentication functionality for testing parts of your engine
gem 'spree', :git => 'https://github.com/spree/spree.git', :branch => '2-0-stable'
gem 'spree_gateway', :git => 'https://github.com/spree/spree_gateway.git', :branch => '2-0-stable'
gem 'spree_auth_devise', :git => 'https://github.com/spree/spree_auth_devise.git', :branch => '2-0-stable'
gemspec
def create
session[:lead_params].deep_merge!(lead_params) if (lead_params)
@lead = Lead.new(session[:lead_params])
@lead.current_step = session[:lead_step]
if params[:back_button]
@lead.previous_step
elsif @lead.last_step?
@lead.save
else
development:
adapter: sqlite3
database: db/development.sqlite3
pool: 5
timeout: 5000
test:
adapter: postgresql
pool: 5
timeout: 5000
@ninabreznik
ninabreznik / index.js
Created February 15, 2016 05:16
requirebin sketch
// require() some stuff from npm (like you were using browserify)
// and then hit Run Code to run it on the right
var curl = require("minixhr")
var ETAG = "dfe1b5b52924c418f4eddcb293fb149f"
//var URL = 'https://api.github.com/users/ninabreznik'
var URL = "http://requestb.in/1comjar1"
var first = false
###########################
# IF / ELSE / ELSE IF #
###########################
You can make a block of code execute when a conditional expression is true using an if statement.
The conditional expression is the expression surrounded by parenethesis following the word IF.
#IF
var x = 11;
@ninabreznik
ninabreznik / gist:9f3799df31e66b9010b6403309dce687
Last active October 24, 2017 16:37
RAILS Cheat Sheet (BACKUP)
RAILS Cheat Sheet!
########################################
Rails Tutorial/Chapter 1
RUN A LOCAL SERVER
$ rails server
CHECK VERSION OF RUBY
$ ruby -v
@ninabreznik
ninabreznik / index.js
Last active July 28, 2016 22:57
requirebin sketch
// https://www.bootstrapcdn.com/fontawesome/
//require('dom-console')({console:true,initAction:'expand'})
// REQUIRE
var yo = require('yo-yo')
var minixhr = require('minixhr')
var csjs = require('csjs-inject')
// GET DATA
minixhr('https://api.github.com/users/esova-ana', responseHandler)
@ninabreznik
ninabreznik / index.js
Last active July 30, 2016 01:04
requirebin sketch
/*--------------------------------------------------------------------------------
REQUIRE
--------------------------------------------------------------------------------*/
var yo = require('yo-yo')
var csjs = require('csjs-inject')
var minixhr = require('minixhr')
var chart = require('chart.js')
/*------------------------------------------
- add arrow to function template on MAIN page
- add css for arrow
-------------------------------------------*/
/*-----------------------------------------------------------------------------
REQUIRE
-----------------------------------------------------------------------------*/
var yo = require('yo-yo')
var minixhr = require('minixhr')
/*-----------------------------------------------------
ADD LOADING DATA
-------------------------------------------------------*/
/*-----------------------------------------------------
UPDATE TEMPLATE FUNCTION
-------------------------------------------------------*/
<div class="${css.question}">
${question}
</div>
/*-----------------------------------------------------------------------------