Skip to content

Instantly share code, notes, and snippets.

@blooies
blooies / async.js
Created October 20, 2017 19:17 — forked from jhickey/async.js
function first() {
console.log('foo');
setTimeout(function() { console.log('bar'); }, 1000);
setTimeout(function() { console.log('baz'); }, 0);
console.log('qux');
}
//In what order do the console statements above print?
first();
@blooies
blooies / this.js
Created October 20, 2017 19:16 — forked from jhickey/this.js
//What does `this` refer to in each context?
/********************************************************************************/
console.log(this);
/********************************************************************************/
var obj = {
subObj: {
@blooies
blooies / 0_reuse_code.js
Created June 5, 2014 13:52
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@blooies
blooies / jquery_example.html
Last active August 29, 2015 13:58 — forked from dbc-challenges/jquery_example.html
Intro to jQuery for Phase 0
<!DOCTYPE html>
<html>
<head>
<title>DOM manipulation with jQuery</title>
<!-- Add a link to jQuery CDN here script here -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script type="text/javascript" src="jquery_example.js"></script>
<style>
@blooies
blooies / 0.2.1-boggle_class_from_methods.rb
Last active August 29, 2015 13:56 — forked from dbc-challenges/0.2.1-boggle_class_from_methods.rb
phase 0 unit 2 week 1boggle class challenge
class BoggleBoard
def initialize(board)
@board = board
end
def create_word(*coords)
coords.map {|coord| @board[coord.first][coord.last]}.join('')
end