Skip to content

Instantly share code, notes, and snippets.

This is a fork of a fork of Bootstrap Typeahead that adds minimal but powerful extensions.

I've added a couple of lines to the original fork to stop the default behaviour when tabbing. For the proper source, please see the original gist.

For example, process typeahead list asynchronously and return objects

  # This example does an AJAX lookup and is in CoffeeScript
  $('.typeahead').typeahead(
    # source can be a function
@jaybobo
jaybobo / 0.2.1-boggle_class_from_methods.rb
Last active January 2, 2016 15:29 — forked from dbc-challenges/0.2.1-boggle_class_from_methods.rb
phase 0 unit 2 week 1 boggle class challenge
class BoggleBoard
attr_reader :board
def initialize(board)
@board = board
end
#your code here
def create_word(*coords)

Process

  • Phone
  • Tech
    • Pairing
    • Whiteboarding
  • Culture

What should you get out of the interview process?

<html>
<head>
<title>Topic Clouds</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<script src="http://d3js.org/d3.v2.min.js?2.10.0"></script>
<script type="text/javascript" src="d3.layout.cloud.js"></script>
</head>
<body>
<script>
@jaybobo
jaybobo / Answers.md
Last active August 29, 2015 14:01 — forked from tennety/IntroClues.md

#firstguess

1 8 each 10 cycle 11 partition 12 .shuffle

2 initialize

Render and Redirect

The normal controller/view flow is to display a view template corresponding to the current controller action, but sometimes we want to change that. We use render in a controller when we want to respond within the current request, and redirect_to when we want to spawn a new request.

Render

The render method is very overloaded in Rails. Most developers encounter it within the view template, using render :partial => 'form' or render @post.comments, but here we'll focus on usage within the controller.

:action

@jaybobo
jaybobo / clithehardway.md
Last active August 29, 2015 14:02
cli terms (mac)
  • pwd - print working directory
  • hostname - my computer's network name
  • mkdir - make directory
  • cd - change directory
  • ls - list directory
  • rmdir - remove directory
  • pushd - push directory
  • popd - pop directory
  • cp - copy a file or directory
  • mv - move a file or directory
@jaybobo
jaybobo / .vimrc
Created June 24, 2014 19:48
.vimrc
"Pathogen install
execute pathogen#infect()
"Autosaves everything when focus is lost
:au FocusLost * silent! wa
"Change the mapleader from \ to ,
let mapleader=","
"Setup Ctrlp.vim plugin
@jaybobo
jaybobo / problem1.markdown
Last active August 29, 2015 14:03
Square Interview Question (Dev Bootcamp)

Question 1:

Let's assume you are building a programming language for only boolean values, that is, true and false: true, false

(Variables: a, b, c... (booleans))

  1. You support the 3 boolean operations, AND (&&), OR (||), and NOT (!):
a &amp;&amp; b

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname