This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 1. Write a class to support the following code: | |
// var thomas = new Person('Thomas'); | |
// var amy = new Person('Amy'); | |
// thomas.name // --> "Thomas" | |
var Person = function( name ){ | |
this.name = name; | |
}; | |
var thomas = new Person('Thomas'); | |
var amy = new Person('Amy'); | |
console.log( thomas.name ) // --> "Thomas" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Part 1. | |
// Implement a function prototype extension that caches function results for | |
// the same input arguments of a function with one parameter. | |
// | |
// For example: | |
// Make sin(1) have the result of Math.sin(1), but use a cached value | |
// for future calls. | |
// | |
// Part 2. | |
// Use this new function to refactor the code example. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# get the current mouse tracking value on osx, default was set to 3 | |
defaults read -g com.apple.mouse.scaling | |
# set a new mouse tracking speed | |
defaults write -g com.apple.mouse.scaling your_mouse_speed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Update the working tree after changes have been pushed here | |
cd .. | |
env -i git reset --hard |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// http://justintadlock.com/archives/2011/10/20/custom-user-taxonomies-in-wordpress | |
// http://justintadlock.com/archives/2011/10/20/custom-user-taxonomies-in-wordpress#comment-568682 | |
/* class to make it easy to add user taxonomies | |
* Useage: | |
* $tax = new User_Taxonomy( array('taxonomy_name'=> 'profession', 'singular_label' => 'Profession', 'plural_label' => 'Professions') ); | |
/*------------------------------------------------------------------------------------------------*/ | |
class User_Taxonomy{ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Set syntax on | |
syntax on | |
" Indent automatically depending on filetype | |
filetype indent on | |
set autoindent | |
" Case insensitive search | |
set ic |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* module: breakpoints | |
* description: module for working with breakpoints, | |
* used within other modules | |
---------------------------------------- */ | |
var WIRED = (function (module) { | |
module.breakpoint = function(){ | |
var actions = {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git fsck --lost-found |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cal 12 2012 #display a visual calender | |
dscacheutil -flushcache #clear your DNS Cache. |
OlderNewer