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
<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
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
# 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
# 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
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
# 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
GIT on bitbucket notes | |
Set up | |
1. Identify yourself | |
# git config --global user.name "My Name" | |
# git config --global user.email [email protected] | |
2. Set up SSH keys - add .ssh/id_rsa.pub to bitbucket | |
https://bitbucket.org/account/user/[username]/ssh-keys/ |
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> | |
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]--> | |
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]--> | |
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]--> | |
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]--> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<link rel="stylesheet" href="style.css"> | |
<title></title> |