Skip to content

Instantly share code, notes, and snippets.

View ryanhburbank's full-sized avatar

Ryan ryanhburbank

  • Moxie
  • Second star on the right, straight on 'till morning
View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<title>Assignment 2</title>
<meta charset="UTF-8">
/*Code for button CSS
.button {
background-color="#00FFCC"
color="#CCAABB"
}
@ryanhburbank
ryanhburbank / gist:e69339b5401013b6de2125e4cd820591
Created August 26, 2016 17:32 — forked from ryansobol/gist:5252653
15 Questions to Ask During a Ruby Interview

Originally published in June 2008

When hiring Ruby on Rails programmers, knowing the right questions to ask during an interview was a real challenge for me at first. In 30 minutes or less, it's difficult to get a solid read on a candidate's skill set without looking at code they've previously written. And in the corporate/enterprise world, I often don't have access to their previous work.

To ensure we hired competent ruby developers at my last job, I created a list of 15 ruby questions -- a ruby measuring stick if you will -- to select the cream of the crop that walked through our doors.

What to expect

Candidates will typically give you a range of responses based on their experience and personality. So it's up to you to decide the correctness of their answer.

@ryanhburbank
ryanhburbank / The Technical Interview Cheat Sheet.md
Created March 10, 2016 04:49 — 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.
@ryanhburbank
ryanhburbank / centered_form.html
Last active December 22, 2015 07:59
Hey I centered the form, let me know if you have any questions
<!DOCTYPE html>
<html lang="en">
<head>
<style>
.link, .link a, .signupframe{
color: #226699;
font-family: Arial, Helvetica, sans-serif;
font-size: 13px;
}

Web Security

This post outlines three common web security vulnerabilities with specific examples in Rails. For a more complete list, I highly recommend the OWASP Rails security cheatsheet.

Cross-Site Scripting (XSS)

A cross-site scripting attack is when malicious scripts are injected into a web site in order to compromise it.

For example, let's say we want to allow html tags such as <strong> in our blog comments, so we render raw output using the Rails method #html_safe:

@ryanhburbank
ryanhburbank / zoo.js
Last active December 20, 2015 05:49 — forked from dbc-challenges/zoo.js
//------------------------------------------------------------------------------------------------------------------
// YOUR CODE: Create your Zoo "object literal" and Animal "constructor" and "prototypes" here.
//------------------------------------------------------------------------------------------------------------------
function Animal(name, numOfLegs) {
this.name = name;
this.numOfLegs = numOfLegs;
};
Animal.prototype.identify = function(){
@ryanhburbank
ryanhburbank / index.html
Last active December 20, 2015 05:38 — forked from dbc-challenges/index.html
DBC Phase 2 Practice Assessment Part 3
<!doctype html>
<html>
<head>
<link rel="stylesheet" href="http://cdn.jsdelivr.net/normalize/2.1.0/normalize.css">
<link rel="stylesheet" href="main.css">
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700,800">
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Lato:100,900">
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/font-awesome/3.0.2/css/font-awesome.min.css">
</head>

Instructions:

  1. Download this application skeleton.
  2. Convert the app to use AJAX.
  3. Add any files you changed to your gist and submit your code.
require 'net/http'
require 'nokogiri'
require 'uri'
require_relative 'util'
class Browser
def run!
get_url
class Vehicle
attr_reader :color, :wheels, :status
def initialize(args)
@color = args[:color]
@wheels = 4
@status = :stopped
end
def drive
@status = :driving