- Python
- svg_stack: https://github.com/astraw/svg_stack
- ImageMagick
- SVGO (https://github.com/svg/svgo)
- libRSVG (http://live.gnome.org/LibRsvg)
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
| <html><head><title></title><meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
| <style type="text/css"> | |
| /* | |
| * ======================================================================== | |
| * Some cross-device, client-specific styles, courtesy of CampaignMonitor | |
| * ======================================================================== | |
| */ | |
| #outlook a { padding: 0; } /* Force Outlook to provide a "view in browser" button. */ | |
| body { width: 100% !important; } |
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
| // Create the test | |
| var pixelRatio = (window.devicePixelRatio >= 1.5) ? "high" : "normal"; | |
| .. | |
| // Pass it along through GA | |
| var _gaq = _gaq || []; | |
| _gaq.push(['_setAccount', 'UA-xxxxxxxx-x']); | |
| // --- IMPORTANT LINE! | |
| // params: event method, custom variable slot, variable name, variable value, scope level |
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
| /** | |
| * Progressive Enahncement to use SVG sprites with PNG fallback for IE6+7 | |
| * | |
| * The trick: | |
| * Legacy IE does not support rgba values. | |
| * By defining a rgba background color together with the | |
| * SVG background image for all modern browsers, legacy IE | |
| * will ignore the SVG and use the | |
| * first background definition containing the fallback PNG | |
| * |
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
| #!/bin/sh | |
| # Examples: | |
| # ./image64.sh myImage.png | |
| # outputs: data:image/png;base64,xxxxx | |
| # ./image64.sh myImage.png -img | |
| # outputs: <img src="data:image/png;base64,xxxxx"> | |
| filename=$(basename $1) | |
| xtype=${filename##*.} | |
| append="" |
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
| require 'formula' | |
| class Fontforge < Formula | |
| url 'http://downloads.sourceforge.net/project/fontforge/fontforge-source/fontforge_full-20110222.tar.bz2' | |
| head 'git://fontforge.git.sourceforge.net/gitroot/fontforge/fontforge' | |
| homepage 'http://fontforge.sourceforge.net' | |
| md5 '5be4dda345b5d73a27cc399df96e463a' | |
| depends_on 'pkg-config' => :build | |
| depends_on 'gettext' |
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
| fs8=`ruby -e "print '$1'.sub(/\.png$/, '-fs8.png')"` | |
| if test -e "$fs8"; then | |
| rm $fs8 | |
| echo "rm $fs8\n" | |
| fi | |
| todataURI() | |
| { | |
| openssl base64 -in $fs8 | awk -v ext="png" '{ str1=str1 $0 }END{ print "data:image/"ext";base64,"str1 }' | pbcopy | |
| } |
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
| .inline-block-container { | |
| letter-spacing: -0.31em; /* Webkit: collapse white-space between units */ | |
| *letter-spacing: normal; /* reset IE < 8 */ | |
| *word-spacing: -0.43em; /* IE < 8: collapse white-space between units */ | |
| text-rendering: optimizespeed; /* Webkit: fixes text-rendering: optimizeLegibility */ | |
| } | |
| /* Opera as of 12 on Windows needs word-spacing. | |
| * The ".opera-only" selector is used to prevent actual prefocus styling | |
| * and is not required in markup. | |
| */ |
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
| 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 |
