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 rc | |
path=($PLAN9/bin) | |
fn datauri { | |
echo data:`{/usr/bin/file -bi $1 | sed 's/ //'}^';'base64,`{/usr/bin/base64 $1 | tr -d '\x0A'} | |
} | |
if(~ $#* 0) | |
echo usage: `{basename $0} file... >[1=2] |
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 rc | |
# Return penultimate (i.e. last but one) item from the list | |
fn penultimate { | |
lbo=`{echo $#* -1|bc} | |
echo -n $*($lbo) | |
} | |
data=(item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item item it |
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/local/plan9/bin/rc | |
path=$PLAN9/bin | |
# List with odd items as keys and even items as values | |
data=('foo' 'bar' \ | |
'bar' 'baz' \ | |
'test' 'passed' \ | |
'foo' 'one more bar' \ | |
'dummy' 'qwerty' \ |
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
DROP PROCEDURE IF EXISTS AddColumn; | |
DELIMITER '//' | |
CREATE PROCEDURE AddColumn( | |
IN dbName TINYTEXT, | |
IN tableName TINYTEXT, | |
IN fieldName TINYTEXT, | |
IN fieldDef TEXT) | |
BEGIN | |
IF NOT EXISTS ( |
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"?> | |
<xsl:stylesheet version="1.0" | |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> | |
<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)"> |
NewerOlder