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
/** | |
* JSONP implementation of the bit.ly API for dynamic | |
* URL shortening | |
* | |
* @author = "Kai Mallea ([email protected])" | |
* | |
* TODO: Add domain param to choose between bit.ly and j.mp | |
*/ | |
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
################################################################## | |
## Citrix User Query ## | |
## ## | |
## Usage: Invoke on a Citrix server with path to a text file ## | |
## containing server names, delimited by new line chars ## | |
################################################################## | |
# Only required parameter is a list of servers | |
param([string]$serverlist = $(Throw "No server list specified.")) |
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
<# | |
Find Manual Drive Mappings | |
Created Mar. 19 2011 by Kai Mallea ([email protected]) | |
License: http://www.opensource.org/licenses/mit-license.php | |
#> | |
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
package main | |
import ( | |
"fmt" | |
"net/textproto" | |
"regexp" | |
) | |
var ( | |
ping = regexp.MustCompile("^PING :([a-zA-Z0-9\\.]+)$") |
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
package main | |
import ( | |
"fmt" | |
"net/textproto" | |
"regexp" | |
"strings" | |
"os" | |
) |
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
/** | |
* Return the highest z-Index used across all elements | |
**/ | |
function getHighIndex (selector) { | |
// No granularity by default; look at everything | |
if (!selector) { selector = '*' }; | |
var elements = document.querySelectorAll(selector) || | |
oXmlDom.documentElement.selectNodes(selector), | |
i = 0, |
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
function separateNumbers (n, sep) { | |
n = n.toString().split(''); | |
var i = n.length - 3; | |
for (; i > 0; i-=3) { | |
n.splice(i, 0, (sep ? sep : ',')); | |
} | |
return n.join(''); | |
} |
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
/* | |
* Extend an object | |
* | |
* Deep copies (recursively) properties from source into target | |
*/ | |
function extend (target, source) { | |
var prop; | |
for (prop in source) { | |
if (Object.prototype.hasOwnProperty.call(source, prop)) { | |
if (typeof source[prop] === 'object') { |
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
function titleCase (str) { | |
var array = str.split(' '), | |
len = array.length, | |
i = 0; | |
for (; i < len; i+=1) { | |
array[i] = array[i][0].toUpperCase() + array[i].slice(1); | |
} | |
return array.join(' '); |
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 khan = (function (document) { | |
var _head = document.getElementsByTagName('head')[0], | |
_reusable_script_ele = document.createElement('script'), | |
_default_host = 'http://www.khanacademy.org/api/v1/'; | |
var _jsonp = function (url) { | |
var script = _reusable_script_ele.cloneNode(false); | |
script.src = url; | |
_head.appendChild(script); | |
}; |
OlderNewer