Skip to content

Instantly share code, notes, and snippets.

View wayneseymour's full-sized avatar
💭
ABC...always be coding :)

Tre' wayneseymour

💭
ABC...always be coding :)
View GitHub Profile
@wayneseymour
wayneseymour / gist:5934737
Created July 5, 2013 14:01
Trying to understand more about js
var getCode = (function(){
var secureCode = "0]Eal(eh&2"; // A code we do not want outsiders to be able to modify...
return function () {
return secureCode;
};
})();
console.log('### getCode(): %d', getCode()); // Returns the secret code
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="[Simplest Unit Test]" />
<title>Test Suite</title>
<script>
function assert(value, desc) {
var li = document.createElement("li");
li.className = value ? "pass" : "fail";
li.appendChild(document.createTextNode(desc));
var Browser = require('zombie'),
url = require('url'),
fs = require('fs'),
$q = require('Q'),
saveDir = __dirname + '/_snapshots';
var scriptTagRegex = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi;
var stripScriptTags = function(html) {
alias c='pushd'
alias d='popd'
alias cdev='c ~/dev > /dev/null'
alias cdown='c /Users/wayne/Downloads > /dev/null'
alias cfs='c /Users/wayne/dev/lrn/node/rest/fake-service > /dev/null'
alias cl='clear'
alias cll='cl; ll'
alias ea='c ~ > /dev/null; vim .bash_profile; d > /dev/null'
alias gb='git branch'
alias gs='cl; git status'
Wayne Kenneth Seymour III {#head}
=====================
<i class="icon-share"></i> **wayneseymour@gmail.com**
<i class="icon-share"></i> [github](https://github.com/wayneseymour) <i class="icon-share"></i> *[twitter](https://twitter.com/wayneseymour)* <i class="icon-share"></i> *[linkedin](http://www.linkedin.com/pub/wayne-kenneth-seymour-iii/6a/8a1/4b3)* <i class="icon-share"></i> *305-523-9617*
----------
A Test Driven, Full Stack JavaScript Developer, with over 13 years of total software engineering experience.
@wayneseymour
wayneseymour / JS Truthy Falsey
Created February 18, 2014 13:16
JS Truthy Falsey
### JavaScript Truthy Falsey
----------
#### JavaScript treats all these values as Truthy:
* true
* 1 (because it’ s a non-zero number)
* "0" (because it’ s a non-empty string)
waseymour@OR-WASEYMOUR-L1 /c/dev/prj/git-repos/asgard.js (jasmine)
$ ./nightwatch -t tests/nightwatch-e2e/jasmine-spike-test.js
ERROR There was an error while starting the test runner:
ReferenceError: describe is not defined
at Object.<anonymous> (c:\dev\prj\git-repos\asgard.js\tests\nightwatch-e2e\jasmine-spike-test.js:3:1)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
@wayneseymour
wayneseymour / kill prok on port 8080.sh
Created February 25, 2014 13:10
Kill a process on Mavericks using lsof
lsof -i tcp:8080
@wayneseymour
wayneseymour / subl_git_merge.sh
Created March 10, 2014 15:44
Steps to use Sublime Text 2 as a merge tool (I did this on my box at work [a windows machine, sadly])
# first, add "sublime dir" to the PATH:
export SUBL_HOME=/c/dev/tools/sublimetext2
export PATH=$SUBL_HOME:$PATH
# second, add a softlink to "subl"
cd $SUBL_HOME
ln -s sublime_text.exe subl
# thrid, conf "subl" as your merge tool
@wayneseymour
wayneseymour / .bashrc
Created March 19, 2014 20:35
Bashrc file for a windows box
alias c=pushd
alias d=popd
alias cdev='c /c/dev'
alias h=history
alias l=ls
alias cl=clear
alias ll='ls -la'
alias ea='c ~ > /dev/null; vi .bashrc; d > /dev/null'
alias rs='c ~ > /dev/null; . .bashrc; d > /dev/null'
alias croot='c /c'