Skip to content

Instantly share code, notes, and snippets.

View jkarnowski's full-sized avatar

Jaclyn Karnowski jkarnowski

  • Karnowski Tech SpA
  • Villarrica, Chile
View GitHub Profile
# Get input from the user: the cheer
def call_out_cheer
puts "Give me a shout!"
cheer = gets.chomp
end
# Determine the mascot's response based on the argument
# passed to the method
def mascot_sign_for(input)
# store the cheers in a hash because they seem like key-value pairs
// a start to refactoring code from phase-2 assessment
function Student(firstName, scores) {
this.firstName = firstName;
this.scores = scores;
}
Student.prototype.averageScore = function(scores) {
var sum = 0
for(var i = 0; i < this.scores.length; i++) {

#Questions for Standup

##Technical

  • How did it go with new technology X today?
  • High points/low points?
  • Line of code you are proud of today?
  • If you had to describe X technology to a non-techie friend, how would you describe it?
  • How did pairing facilitate your learning today?
  • Favorite new shortcut?
  • Toughest technical moment from today?
require_relative 'grocery_list'
describe GroceryList do
# creates an object to use | consider: what's the scope of sunday_groceries?
let(:sunday_groceries) { GroceryList.new }
it 'creates a grocery list object' do
expect(sunday_groceries).to be_instance_of GroceryList
end
# WHAT REQUEST ALLOWS FOR USER REGISTRATION?
get '/users/new' do
erb :'users/new'
end
# WHAT REQUEST SENDS THE USER DATA TO THE DATABASE?
# this is one approach to accepting params. Can accept params a few different ways.
post '/users' do
user = User.new(params)
# SESSIONS
# where did you enable sessions?
# WHAT REQUEST ALLOWS A USER TO LOGIN?
get '/sessions/new' do
erb :'users/login'
end
# WHAT REQUEST SENDS THE USER DATA TO SET THE SESSION?
helpers do
def login(user)
session[:id] = user.id
end
def logged_in?
session[:id] != nil
end
require 'rails_helper'
RSpec.describe ClearanceBatchesController, type: :controller do
subject(:clearancing_service) { ClearancingService.new }
def expect_response_to_render_index
expect(response).to render_template :index
end
// Place all the behaviors and hooks related to the matching controller here.
// All this logic will automatically be available in application.js.
$(document).ready(function(){
var handler = StripeCheckout.configure({
key: 'pk_test_UlUbDYdUkO0qkJ2r1Iw3DYtZ',
locale: 'auto',
token: function(token) {
// Use the token to create the charge with a server-side script.
// You can access the token ID with `token.id`
@jkarnowski
jkarnowski / The Technical Interview Cheat Sheet.md
Last active September 13, 2015 21:47 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.