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
# on mac first install brew, xz and gawk | |
echo 1328557894 | gawk '{print strftime("%c",$0)}' | |
# get timestamp | |
date +%s |
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
echo -n `find . -name "*.x*" -print -exec awk -v RS='"' '/font_name=$/{getline;print}' {} \;` >> font-names1.txt; | |
sed -e 's/ \//\ | |
\//g' font-names1.txt > font-names2.txt;sed -e 's/ \.\//\ | |
\.\//g' font-names2.txt > font-names3.txt;cat font-names3.txt | sort | uniq > font-names4.txt;cat font-names4.txt;rm font* |
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
# get all the values for the xml attribute "font_name" from the XDT files | |
find . -name "*.xdt" -print -exec awk -v RS='"' '/font_name=$/{getline;print}' {} \; |
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
# node: http://stackoverflow.com/questions/5009324/node-js-nginx-and-now | |
sudo apt-get install python-software-properties python g++ make | |
sudo add-apt-repository ppa:chris-lea/node.js | |
sudo apt-get update | |
sudo apt-get install nodejs npm | |
# http://kvz.io/blog/2009/12/15/run-nodejs-as-a-service-on-ubuntu-karmic/ | |
in /etc/init.d/nodeapp.conf (chmod u+x) |
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
http://code.google.com/p/html5shiv/ | |
article, aside, figure, footer, header, hgroup, | |
menu, nav, section { display: block; } | |
legend, time, mark, dialog { display: block; } | |
dialog dt, dialog dd |
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
<meta id="viewport" name='viewport'> | |
<script> | |
(function(doc) { | |
var viewport = document.getElementById('viewport'); | |
if ( navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPod/i)) { | |
doc.getElementById("viewport").setAttribute("content", "width=device-width,user-scalable=no,initial-scale=0.75, maximum-scale=0.75, minimum-scale=0.75"); | |
} else if ( navigator.userAgent.match(/iPad/i) ) { | |
doc.getElementById("viewport").setAttribute("content", "width=device-width,user-scalable=no,initial-scale=1, maximum-scale=1, minimum-scale=1"); | |
} | |
}(document)); |
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/bash | |
# make a file with lines matching something | |
# usage: ./p.sh in.txt | |
while read line; | |
do | |
if [[ "$line" != *_S.jpg* ]] | |
then |
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
/Applications/MAMP/Library/bin/mysql -uroot -p dbname < importme.sql |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<!-- | |
Assumes that: | |
1. the jQuery library is here |
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
/* apply to parent container to clear children that float */ | |
#divparent:after, | |
{ | |
content: "."; | |
display: block; | |
height: 0; | |
clear: both; | |
visibility: hidden; | |
} |