Skip to content

Instantly share code, notes, and snippets.

@kuatsure
Created Feb 18, 2014
Embed
What would you like to do?
python -c $'import SimpleHTTPServer;\nmap = SimpleHTTPServer.SimpleHTTPRequestHandler.extensions_map;\nmap[""] = "text/plain";\nfor key, value in map.items():\n\tmap[key] = value + ";charset=UTF-8";\nSimpleHTTPServer.test();' "8000"
if [ ! -d site ]; then
# download .zip file
wget https://github.com/daytoncleancoders/projects/raw/master/commandline/command-line-kata.zip
# extraction ( all .zips, not just the above in pwd )
tar -xf *.zip
# cd into project directory
cd site
# begin move
mkdir img
find . -name \*.jpg -print -exec mv {} img/ \;
find . -name \*.png -print -exec mv {} img/ \;
mkdir css
find . -name \*.css -print -exec mv {} css/ \;
mkdir js
find . -name \*.js -print -exec mv {} js/ \;
mkdir fonts
find . -name \*.woff -print -exec mv {} fonts/ \;
fi
# start httpserver
if [ -d site ]; then
python -c $'import SimpleHTTPServer;\nmap = SimpleHTTPServer.SimpleHTTPRequestHandler.extensions_map;\nmap[""] = "text/plain";\nfor key, value in map.items():\n\tmap[key] = value + ";charset=UTF-8";\nSimpleHTTPServer.test();' "8000"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment