View login.js
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
require('colors'); | |
var chai = require("chai"); | |
var chaiAsPromised = require("chai-as-promised"); | |
chai.use(chaiAsPromised); | |
chai.should(); | |
var wd = require('wd'); | |
// enables chai assertion chaining | |
chaiAsPromised.transferPromiseness = wd.transferPromiseness; |
View wdfun.js
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
var fs = require('fs'); | |
var rmrf = require('rimraf'); | |
var path = require('path'); | |
var Q = require('q'); | |
require('colors'); | |
var chai = require("chai"); | |
var chaiAsPromised = require("chai-as-promised"); | |
chai.use(chaiAsPromised); | |
chai.should(); |
View sbt
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 | |
if [ -f "$HOME/.sbtconfig" ]; then | |
echo "Use of ~/.sbtconfig is deprecated, please migrate global settings to /usr/local/etc/sbtopts" >&2 . "$HOME/.sbtconfig" | |
fi | |
exec "/usr/local/Cellar/sbt/0.13.7/libexec/sbt" "$ |
View vpc.yml
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
- command: "aws ec2 describe-subnets --filters Name=tag:Tier,Values=pub Name=vpc-id,Values={{aws_vpc_id}}" | |
register: awscli | |
- set_fact: | |
pub_subnets: "{{awscli.stdout | from_json}}" | |
- set_fact: | |
pub_subnet: "{{pub_subnets['Subnets']|first}}" | |
- set_fact: | |
pub_subnet_id: "{{pub_subnet['SubnetId']}}" |
View err.msg
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
hitman@Bryans-MacBook-Pro:~/pr/sellsword$ go vet github.com/bryanwb/sellsword | |
vet: error walking tree: stat ../go/src/github.com/bryanwb/sellsword/app.go: no such file or directory | |
vet: error walking tree: stat ../go/src/github.com/bryanwb/sellsword/appset.go: no such file or directory | |
vet: error walking tree: stat ../go/src/github.com/bryanwb/sellsword/env.go: no such file or directory | |
vet: ../go/src/github.com/bryanwb/sellsword/app.go: open ../go/src/github.com/bryanwb/sellsword/app.go: no such file or directory | |
vet: no files checked | |
exit status 1 |
View bad.yml
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
# this fails on the "set" tag | |
- set_fact: instances="{%- set instances = dict() %} | |
{%- for group in group_names %} | |
{%- for host in groups[group] %} | |
{%- if hostvars[host].get('InstanceId', None) %} | |
{%- if hostvars[host].get('Platform', None) == 'windows' %} | |
{%- set tmp = instances.setdefault(host, hostvars[host]['InstanceId']) %} | |
{%- endif %} | |
{%- endif %} | |
{%- endfor %} |
View Compressing and Concatenating JS
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
// hope this answers your question | |
//first follow the instructions for setting up narwhal | |
// http://karmaeducation.org/2010/01/15/getting-started-with-narwhal-a-standard-library-for-javascript/ | |
//update your catalog of available commonJS packages | |
// tusk is a lot like ruby's 'gem' command | |
$ tusk update | |
//then install yuicompressor, shrinksafe others |
View simple markup
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
<body> | |
<div id="kHeader"> | |
</div> | |
<!-- Put the help text here --> | |
<div id="kHelpText" title="Help Title"> Help text here</div> | |
<div id="feedback"></div> | |
<div id="gameArea"> | |
<div id="questionBox">What is this?</div> |
View gist:314503
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
function divide(a, b) { return function (callback, errback) { | |
// Use nextTick to prove that we're working asynchronously | |
process.nextTick(function () { | |
if (b === 0) { | |
errback(new Error("Cannot divide by 0")); | |
} else { | |
callback(a / b); | |
} | |
}); | |
}} |
View reverse.c
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
/* reverse: reverse string s in place */ | |
void reverse(char *s) | |
{ | |
int j = 0; | |
int temp = 0; | |
char *i = s; | |
s += strlen(s) - 1; | |
while (s != i){ |
OlderNewer