Skip to content

Instantly share code, notes, and snippets.

View stdclass's full-sized avatar

Phillip Dornauer stdclass

View GitHub Profile
<!doctype html>
<html>
<head>
<script src="assets/admin/js/jquery.js"></script>
</head>
<body>
<div>
<select id="dropdown-1">
<option value="someval1" data-dropdown="dropdown-2">Value 1</option>
<option value="someval2" data-dropdown="dropdown-3">Value 2</option>
@stdclass
stdclass / js-scope.js
Created June 10, 2014 13:06
Javascript Scope
var test = {
name: "foo",
sayHello: function(){
console.log("my name: " + this.name);
}
};
@stdclass
stdclass / index.html
Created December 10, 2012 10:11 — forked from mbostock/.block
Square Circle Spiral Illusion
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<style type="text/css">
body {
background: #888;
}
@stdclass
stdclass / gist:3858093
Created October 9, 2012 11:25
Hackerthon 3.0 - Arduino powered tablesoccer
@stdclass
stdclass / js-masterclass-events.js
Created December 13, 2011 19:16
js master class - phillipdornauer
<div id="the_div">
<ul id="the_list">
<li id="the_item">Click me!</li>
</ul>
</div>
<p id="log"></p>
<script type="text/javascript" charset="utf-8">
@stdclass
stdclass / js-masterclass-homework-easy.js
Created December 12, 2011 20:59
JS Master Class Homework
// 1. Write a class to support the following code:
var thomas = new Person('Thomas');
var amy = new Person('Amy');
thomas.name // --> "Thomas"
// 2. Add a getName() method to all Person objects, that outputs
// the persons name.
thomas.getName() // --> "Thomas"
@stdclass
stdclass / js-masterclass-3.js
Created December 12, 2011 20:41
js master class - phillipdornauer
// Exercise 1 - OO || !OO
// Define a data structure for cars (make and color), and a function
// that logs a string like "I'm a red Mercedes" to the console.
// Make two versions: a functional version, and a object-oriented version.
function logCar( car ){
console.log("I'm a " + car.color + " " + car.make);
@stdclass
stdclass / js-masterclass-2.js
Created December 12, 2011 19:45
js master class - phillipdornauer
// Exercise 2 - Closures
// Wrap the following code in a closure and export only the "countdown" function.
// Code
(function(exportName, container){
var index;
function log(){
@stdclass
stdclass / jsmasterclass-exercides-1.js
Created December 12, 2011 18:33
Make this better - phillipdornauer
// taken from http://www.dreamincode.net/code/snippet154.htm
//
// Find the weaknesses, and clean up the code.
// Find at least 3 things you can make better!
//
// Test numbers (return true):
// 4111111111111111
// 378282246310005
// 5555555555554444
Contact
===
sdfsdfdsf
dsfdsfdsf
*ffffff*