Skip to content

Instantly share code, notes, and snippets.

@allenwlee
allenwlee / flashcard.txt
Last active December 15, 2015 07:29
cards
classes: card, deck
modules: io, check, ui
flow
open file
parse
create card
add card to deck
shuffle cards

select voters.last_name, voters.first_name, congress_members.name, count() from voters, votes, congress_members where voters.id = votes.voter_id and congress_members.id = votes.politician_id group by politician_id having count() > 1 order by voters.first_name;

@allenwlee
allenwlee / lecture_notes.js
Created May 1, 2013 01:10
js stuff from lecture
var OrangeTree = function() {
this.age = 0;
this.height = 0;
}
var orangeTree = new OrangeTree();
OrangeTree.prototype.increaseAge = function() {
this
};
@allenwlee
allenwlee / index.html
Created May 2, 2013 21:20 — 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>
@allenwlee
allenwlee / zoo.js
Last active December 17, 2015 00:19 — forked from dbc-challenges/zoo.js
//------------------------------------------------------------------------------------------------------------------
// YOUR CODE: Create your Zoo "object literal" and Animal "constructor" and "prototypes" here.
//------------------------------------------------------------------------------------------------------------------
var Zoo = {
init: function(animals) {
this.animals = animals;
},
bipeds: function() {
/* Here is your chance to take over Socrates!
Spend 10 minutes on each of the following hacks to the socrates website.
Enter them in the console to make sure it works and then save
your results here.
Choose a new pair for each. Add your names to the section you complete.
*/
/* Here is your chance to take over Socrates!
Spend 10 minutes on each of the following hacks to the socrates website.
Enter them in the console to make sure it works and then save
your results here.
Choose a new pair for each. Add your names to the section you complete.
*/
<?xml version="1.0" encoding="utf-8" ?>
<!-- SQL XML created by WWW SQL Designer, http://code.google.com/p/wwwsqldesigner/ -->
<!-- Active URL: http://socrates.devbootcamp.com/sql -->
<sql>
<datatypes db="mysql">
<group label="Numeric" color="rgb(238,238,170)">
<type label="Integer" length="0" sql="INTEGER" re="INT" quote=""/>
<type label="Decimal" length="1" sql="DECIMAL" re="DEC" quote=""/>
<type label="Single precision" length="0" sql="FLOAT" quote=""/>
<type label="Double precision" length="0" sql="DOUBLE" re="DOUBLE" quote=""/>
@allenwlee
allenwlee / index.html
Created May 27, 2013 23:21 — 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>

An advanced function naming style

Everywhere possible, this is the preferred style, if you understand all the quirks to it. There aren't too many.

function foo() {

}

With this, you get function names in the fewest possible characters, there's only one caveat: