Skip to content

Instantly share code, notes, and snippets.

View cwgem's full-sized avatar

Chris White cwgem

View GitHub Profile
@cwgem
cwgem / subst.c
Created April 3, 2013 04:59
Example of hardcoded iteration limit of positional parameters to single digit values in bash source code
/* Return the word list that corresponds to `$*'. */
WORD_LIST *
list_rest_of_args ()
{
register WORD_LIST *list, *args;
int i;
/* Break out of the loop as soon as one of the dollar variables is null. */
for (i = 1, list = (WORD_LIST *)NULL; i < 10 && dollar_vars[i]; i++)
list = make_word_list (make_bare_word (dollar_vars[i]), list);
@cwgem
cwgem / gist:5233698
Created March 24, 2013 21:50
Unordered List Styling
html { font-size: 100%; /* IE hack */ }
body {
/* IE5/Win */
text-align:center;
padding-top: 30px;
font-size: 0.75em;
}
/* Title font. */
@cwgem
cwgem / gist:5233666
Created March 24, 2013 21:40
Block Spacing
html { font-size: 100%; /* IE hack */ }
body {
/* IE5/Win */
text-align:center;
padding-top: 30px;
font-size: 0.75em;
}
/* Title font. */
@cwgem
cwgem / gist:5233605
Last active December 15, 2015 08:49
Line Height
html { font-size: 100%; /* IE hack */ }
body {
/* IE5/Win */
text-align:center;
padding-top: 30px;
font-size: 0.75em;
}
/* Title font. */
@cwgem
cwgem / gist:5226577
Created March 23, 2013 05:28
Font family. `Helvetica, Arial, sans-serif` header `Georgia, Times, serif` body.
html { font-size: 100%; /* IE hack */ }
body {
/* IE5/Win */
text-align:center;
padding-top: 30px;
font-size: 0.75em;
}
/* Title font. */
html { font-size: 100%; /* IE hack */ }
body {
/* IE5/Win */
text-align:center;
padding-top: 30px;
font-size: 0.75em;
}
/* Title font. */
@cwgem
cwgem / gist:5226520
Last active December 15, 2015 07:49
CSS Change History
html { font-size: 100%; /* IE hack */ }
body {
/* IE5/Win */
text-align:center;
padding-top: 30px;
font-size: 0.75em;
}
/* Title font. */
@cwgem
cwgem / after.html
Created March 23, 2013 03:37
AsciiDoc output before and after cleaning up the XHTML output config file. `-a linkcss -a stylesdir=/css -a disable-javascript` asciidoc options do a majority of the <head> cleanup.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
<meta name="generator" content="AsciiDoc 8.6.8" />
<title>The Personal Site of Chris White (cwgem)</title>
<link rel="stylesheet" href="/css/reset.css" type="text/css" />
<link rel="stylesheet" href="/css/modern.css" type="text/css" />
@cwgem
cwgem / portrait.txt
Created March 13, 2013 00:24
My Twitter profile picture as ascii art courtesy of Gimp and aalib
WWm###mmBmm###BWBWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWBWW
WBm####mmmm#Z#mBBmBmWmWmWmWBWBWBWBWWBWBWWBWBWWBWBWWBWmWBWmWBWmWBWmWBBBBWmWmWmWmWmBBBBBBmBmBmBmBmBBBB
WW#####mmBm#U#mWmWBWBWmWBWBWBWBWBWBWBWBWmWWBWmWWBWmWBWWBWWBWBWWBWWBWWBWmWBWBWBWBWWBWBWBWWBWWBWWBWmWB
WBm#####mB##Z#mBBWmWBBWBWBWWWBWBWBWBWBWBWWmWWWBWBWWWBWmWmWmWBWmWBBWmWBWBWBWmWBWmWmWmWmWmWmWmWmBBBWmW
WWm##Z#mmBm#ZmmWmBWmWBBWBWBWmWWBWWBWWBWWmWWBWmWBWBBWmWBWWBWWBWWBWWmWWBWBWBWBWBWBWWmWBWBWmWmWmWWmWmWm
WW#####mmmm#ZmmBWmWBWBWmWWBWWWBWBWBWBWBWWWmWWBWBWBWBWBWmWmWmWmWBWmWWmWBWmWBWmWmWBBWBWmWBWBWmWBmWmWmW
WW######mW####mWmWmWmWBWWmWWmWWBWWBWWBWBWmWWmWWBWBWBWmWBBWBWWBWBWBWBWWBWWBWmWWBWBWmWmWBWmWmWBWBWmWBB
WW######mmm#Z#mBBBWBWBWmWWWBWWmWWmWWBWWWBWWBWBBWmWBWmW#mmmWmBWBWmWWBWmWmWBWBWmWmWBWBWBWmWBWmWmWmWmWm
WWm#####mW####mWmWmWmWmWWmWWBWWWBWWBWBWmWWmWmBUVVVUUS1**YSX#BmWmWWmWmWWBWBWBWWBWBWmWmWmWBWmWmWmWmWmW
WWm#####mmm#Z#mBBBWmWWBWBWWmWWmWWBWWmWBWBmWX1l||i|i|||||||iIS#mBWmWBWWmWBWBWmWBWBWBWBWBWmWmWBWBWBWmW
@cwgem
cwgem / gist:5107976
Last active December 14, 2015 15:29
Hacking around with the crazy idea of object oriented in bash because I can
#!/bin/bash
# @cwgem (Chris White)
# Screwing around with the concept of objects in bash
# Not POSIX compliant and as with many bash scripts a huge hack ;)
# Hold "object properties" in a global associative array
# So far this means basically static objects with no instances
declare -A _Person