This file contains hidden or 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
#!/usr/bin/env ruby | |
def valid?(range) | |
range.split("/").size == 2 && range.split(".").size == 4 | |
end | |
print "Enter IP address range in CIDR notation. Example [192.168.1.0/24]: " | |
while true do | |
range = gets |
This file contains hidden or 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 _ = require('underscore') | |
, a = require('assert'); | |
var firstArg; | |
var handler = function (){}; | |
var wrapped = _.wrap(handler, function (func){ | |
console.log('--> arguments is wrong or unexpected', arguments); | |
a.strictEqual(arguments[0], func); |
This file contains hidden or 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('foounit').globalize() | |
describe 'this is a test group', -> | |
x = null | |
before -> | |
x = 1 | |
it 'has a failing test', -> | |
expect(x).to beTrue |
This file contains hidden or 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 a = require('assert') | |
, fu = require('foounit').globalize(); | |
it('test some timeout stuff', function (){ | |
var x; | |
setTimeout(function (){ | |
x = true; | |
}, 1000); |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>TestApp</title> | |
</head> | |
<body> | |
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> | |
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> |
This file contains hidden or 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
<?xml version="1.0" encoding="UTF-8"?> | |
<application xmlns="http://ns.adobe.com/air/application/2.0"> | |
<id>TestApp</id> | |
<version>001</version> | |
<filename>TestApp</filename> | |
<initialWindow> | |
<content>test.html</content> | |
<visible>true</visible> | |
<width>553</width> |
This file contains hidden or 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
[core] | |
repositoryformatversion = 0 | |
filemode = true | |
bare = false | |
logallrefupdates = true | |
ignorecase = true | |
[color] | |
branch = auto | |
diff = auto | |
status = auto |
This file contains hidden or 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/SVN/PS1 | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(git::\1)/' | |
} | |
parse_svn_branch() { | |
parse_svn_url | sed -e 's#^'"$(parse_svn_repository_root)"'##g' | awk -F / '{print "(svn::"$1 "/" $2 ")"}' | |
} | |
parse_svn_url() { | |
svn info 2>/dev/null | grep -e '^URL*' | sed -e 's#^URL: *\(.*\)#\1#g ' | |
} |
This file contains hidden or 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
dojo.publish = function(topic, args) { | |
var f = dojo._topics[topic]; | |
for (var t in dojo._topics) { | |
var re = new RegExp("^" + t) | |
if (topic.match(t)) { | |
var argArray = []; | |
if (args) { | |
dojo.forEach(args, function(arg) { | |
argArray.push(arg) |
This file contains hidden or 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 events = new Object(); | |
util.mixin(events, { | |
_channels: {}, | |
_regExpChannels: [], | |
publish: function(name, args) { | |
var handles = this._channels[name] && this._channels[name].handles; | |
if (handles) { | |
this._applyHandles(handles, name, args); | |
} |
NewerOlder