Skip to content

Instantly share code, notes, and snippets.

@adamwatters
adamwatters / Edited Bridge Example
Created April 21, 2015 02:01
Edited Bridge Example for Arduino Yun
/*
Arduino Yún Bridge example
This example for the Arduino Yún shows how to use the
Bridge library to access the digital and analog pins
on the board through REST calls. It demonstrates how
you can create your own API when using REST style
calls through the browser.
Possible commands created in this shetch:
@adamwatters
adamwatters / Edited HTTPclient Example
Created April 21, 2015 02:51
Edited HTTPclient Example
/*
Yún HTTP Client
This example for the Arduino Yún shows how create a basic
HTTP client that connects to the internet and downloads
content. In this case, you'll connect to the Arduino
website and download a version of the logo as ASCII text.
created by Tom igoe
May 2013
@adamwatters
adamwatters / DB1.markdown
Last active October 28, 2016 16:39
Stanford Online - DB1 (Introduction and Relational Databases) Notes

##Introduction and Relational Databases

DBMS database managament systems

efficient - 1000s of queries/updates per second.

reliable - 99.9999%

convenient - physical data independence, abstraction from the details of how the data

@adamwatters
adamwatters / DB4.markdown
Last active October 28, 2016 18:26
Stanford Online - DB4 (Relational Algebra) Notes

##Relational Algebra

formal language underpinning of SQL

operators select, project, join

queries (experessions) operate on relations and return relations

@adamwatters
adamwatters / DB5.markdown
Created October 28, 2016 23:34
Stanford Online - DB5 (SQL) Notes

SQL

  • Implemented standard
  • Declarative, based on relational algebra
  • supported by all major dms
  • unordered model

DDL - Data Def Lang

  • create table
  • drop table
@adamwatters
adamwatters / nosql.markdown
Last active October 29, 2016 00:38
Notes of NoSQL databases

NoSQL Databases

1980s Rise of Relational Databases

  • persistence
  • transactions
  • reporting
  • integration
  • sql

Problem

@adamwatters
adamwatters / scss-reading-notes.markdown
Created November 9, 2016 01:45
Notes on Modular SCSS
@adamwatters
adamwatters / binary-tree.markdown
Created November 10, 2016 19:27
notes on binary trees
@adamwatters
adamwatters / event-loop.markdown
Created November 17, 2016 02:48
what the heck is the event loop?

What is the JS event loop?

How does JS even work?

  • v8 (chromes run time)
  • single threaded
  • callbacks

js says...

"a signle-threaded non-blocking asynchronous concurrent language"

@adamwatters
adamwatters / isDead.js
Created February 15, 2017 19:19
Checking if a piece in the game of Go is dead.
const spaceAt = (board, x, y) => {
if (x < 0 || x > board[0].length - 1) {
return 'outOfBounds'
}
if (y < 0 || y > board.length - 1) {
return 'outOfBounds'
}
return {content: board[y][x], x: x, y: y}
}