Converts all paths in an SVG file to all-absolute / all-relative coordinates, and prints the result to stdout.
Origin: https://github.com/johan/kilobyte-svg-challenge/blob/master/tools/
Converts all paths in an SVG file to all-absolute / all-relative coordinates, and prints the result to stdout.
Origin: https://github.com/johan/kilobyte-svg-challenge/blob/master/tools/
| #!/bin/bash | |
| aptitude -y install expect | |
| // Not required in actual script | |
| MYSQL_ROOT_PASSWORD=abcd1234 | |
| SECURE_MYSQL=$(expect -c " | |
| set timeout 10 |
| <table role="grid"> | |
| <thead> | |
| <tr role="row"> | |
| <th scope="col" role="columnheader">Name</th> | |
| <th scope="col" role="columnheader">Email</th> | |
| <th scope="col" role="columnheader">Dept, Title</th> | |
| <th scope="col" role="columnheader">Phone</th> | |
| </tr> | |
| </thead> | |
| <tbody> |
| gifify() { | |
| if [[ -n "$1" ]]; then | |
| if [[ $2 == '--good' ]]; then | |
| ffmpeg -i $1 -r 10 -vcodec png out-static-%05d.png | |
| time convert -verbose +dither -layers Optimize -resize 600x600\> out-static*.png GIF:- | gifsicle --colors 128 --delay=5 --loop --optimize=3 --multifile - > $1.gif | |
| rm out-static*.png | |
| else | |
| ffmpeg -i $1 -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > $1.gif | |
| fi | |
| else |
| # 5G BLACKLIST/FIREWALL (2013) | |
| # @ http://perishablepress.com/5g-blacklist-2013/ | |
| # 5G:[QUERY STRINGS] | |
| <IfModule mod_rewrite.c> | |
| RewriteEngine On | |
| RewriteBase / | |
| RewriteCond %{QUERY_STRING} (\"|%22).*(<|>|%3) [NC,OR] | |
| RewriteCond %{QUERY_STRING} (javascript:).*(\;) [NC,OR] | |
| RewriteCond %{QUERY_STRING} (<|%3C).*script.*(>|%3) [NC,OR] |
| /** | |
| * Converts an RGB color value to HSL. Conversion formula | |
| * adapted from http://en.wikipedia.org/wiki/HSL_color_space. | |
| * Assumes r, g, and b are contained in the set [0, 255] and | |
| * returns h, s, and l in the set [0, 1]. | |
| * | |
| * @param Number r The red color value | |
| * @param Number g The green color value | |
| * @param Number b The blue color value | |
| * @return Array The HSL representation |
| serialize: function serialize(form) | |
| { | |
| if (!form || form.nodeName !== "FORM") { | |
| return; | |
| } | |
| var i, j, | |
| obj = {}; | |
| for (i = form.elements.length - 1; i >= 0; i = i - 1) { | |
| if (form.elements[i].name === "") { | |
| continue; |
| /* | |
| * I add this to html files generated with pandoc. | |
| */ | |
| html { | |
| font-size: 100%; | |
| overflow-y: scroll; | |
| -webkit-text-size-adjust: 100%; | |
| -ms-text-size-adjust: 100%; | |
| } |
| #!/bin/bash | |
| # Usage: slackpost <token> <channel> <message> | |
| # Enter the name of your slack host here - the thing that appears in your URL: | |
| # https://slackhost.slack.com/ | |
| slackhost=PUT_YOUR_HOST_HERE | |
| token=$1 |