Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View sharnie's full-sized avatar

Sharnie Ivery sharnie

View GitHub Profile
@sharnie
sharnie / javascript_build_system_for_sublime.json
Created September 4, 2015 19:53
JavaScript build for Sublime
{
"cmd": ["/usr/local/bin/node", "$file", "$file_base_name"],
"working_dir": "${project_path:${folder}}",
"selector": "*.js"
}
require 'nokogiri'
require 'open-uri'
usernames = [
'brianknight10',
'annekagoss',
'bethannezink',
'DanFerrer',
'antropova',
'himedlooff',
if (!document.querySelectorAll) {
document.querySelectorAll = function (selectors) {
var style = document.createElement('style'), elements = [], element;
document.documentElement.firstChild.appendChild(style);
document._qsa = [];
style.styleSheet.cssText = selectors + '{x-qsa:expression(document._qsa && document._qsa.push(this))}';
window.scrollBy(0, 0);
style.parentNode.removeChild(style);
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
<style id="jsbin-css">
@import url(http://fonts.googleapis.com/css?family=Open+Sans:400,700,600);
body {
background-color: #2ecc71;
class SearchController < ApplicationController
def index
access_token = "YOUR ACCESS TOKEN HERE" # should have been session[:access_token]. Never store credentials in your code
client = Instagram.client(access_token: access_token)
geocoder = Geocoder.search(params[:q] || "brooklyn, new york")
lat = geocoder.first.data["geometry"]["location"]["lat"]
lng = geocoder.first.data["geometry"]["location"]["lng"]
@results = client.location_search(lat, lng)
end
end
@sharnie
sharnie / gist:9486321519c39574305c
Created December 9, 2014 23:11
Center/Middle Div
#outer {
width: 100%;
text-align: center;
}
#inner {
display: inline-block;
}
for(var i = 1; i <= 20; i++) {
if( i % 3 === 0 && i % 5 === 0 ) {
console.log( "FizzBuzz" );
} else if( i % 3 === 0 ) {
console.log( "Fizz" );
} else if( i % 5 === 0 ) {
console.log( "Buzz" );

Interview Prep

General Thoughts for Interviewing

Three Primary Responsibilities

  • Build.
  • Blog.
  • Bresent.

Problem Solving

"Make it work, make it right, make it fast."

Sublime Text 2 - Useful Shortcuts
=================================
*Tested in Mac OS X: super == command*
Open/Goto
_________
- super+t: go to file
- super+ctrl+p: go to project
- super+r: go to methods
name = "Sharnie Ivery"
<<-`GREET`
hostname
whoami
GREET
# => "sharnieivery"