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
<xsl:template name="string-replace-all"> | |
<xsl:param name="text"/> | |
<xsl:param name="replace"/> | |
<xsl:param name="by"/> | |
<xsl:choose> | |
<xsl:when test="contains($text,$replace)"> | |
<xsl:value-of select="substring-before($text,$replace)"/> | |
<xsl:value-of select="$by"/> | |
<xsl:call-template name="string-replace-all"> | |
<xsl:with-param name="text" select="substring-after($text,$replace)"/> |
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
<xsl:variable name="href-override" select="/SAM/navigation/link[@id = /SAM/page/@id]/href-override" /> | |
<xsl:if test="$href-override"> | |
<xsl:choose> | |
<xsl:when test="@directive = 'admin'"> | |
<p class="error" style="text-align:center"> | |
This page is redirecting to <a href="{$href-override}" target="_blank"><xsl:value-of select="$href-override"/></a>.<br /> | |
You may change this in Architecture > Edit Page Info > Edit Advanced > Manual URL Override. | |
</p> | |
</xsl:when> | |
<xsl:otherwise> |
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 request = require("request"), | |
_ = require("underscore")._; | |
/* | |
# Simple API Request | |
*/ | |
exports["request"] = function(params, credentials, cb) { | |
var reqString = params.url, |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>$archiver</key> | |
<string>NSKeyedArchiver</string> | |
<key>$objects</key> | |
<array> | |
<string>$null</string> | |
<dict> |
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
export PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:~/scripts | |
export CLICOLOR=1 | |
export LSCOLORS=hxFxBxDxCxegedabagacad | |
alias dir="ls -lahG" | |
alias ll="ls -lahG" | |
alias qws="python -m SimpleHTTPServer" | |
alias rscp='rsync -aP' | |
alias rsmv='rsync -aP --remove-source-files' |
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/bash | |
echo "-- Adds your id_rsa.pub to a remote system authorized keys --" | |
echo "Usage: $0 <user>@<host>" | |
if [ -z "$1" ]; then | |
echo -n "User: " | |
read user | |
echo -n "Host: " |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>me.screenshot</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>/Users/john/scripts/screenshot.sh</string> | |
</array> |
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 getGB(bytes) | |
getGB = Fix(bytes / 1073741824) | |
end function | |
Set fso = CreateObject("Scripting.FileSystemObject") | |
Set d = fso.GetDrive("C:") | |
response.write getGB(d.FreeSpace) & "GB free of " & getGB(d.TotalSize) & " GB" | |
%> |
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
//Put this in your home directory... Unless you need project specific settings | |
{ | |
"extends": "idiomatic", | |
"rules": { | |
"quotes": ["warn","double"], | |
"space-in-parens": ["warn","never"], | |
"array-bracket-spacing": ["warn","never"], | |
"computed-property-spacing": ["warn","never"], | |
"one-var-declaration-per-line": ["warn","initializations"], | |
"semi": ["error","always",{ |
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
@echo off | |
echo Installing Disk Cleanup if not already installed. | |
if not exist %SYSTEMROOT%\System32\cleanmgr.exe ( | |
copy /Y C:\Windows\winsxs\amd64_microsoft-windows-cleanmgr_31bf3856ad364e35_6.1.7600.16385_none_c9392808773cd7da\cleanmgr.exe %SYSTEMROOT%\System32\ | |
) | |
if not exist %SYSTEMROOT%\System32\en-US\cleanmgr.exe.mui ( | |
copy /Y C:\Windows\winsxs\amd64_microsoft-windows-cleanmgr.resources_31bf3856ad364e35_6.1.7600.16385_en-us_b9cb6194b257cc63\cleanmgr.exe.mui %SYSTEMROOT%\System32\en-US\ | |
) |
OlderNewer