Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| # OSX for Hackers (Mavericks/Yosemite) | |
| # | |
| # Source: https://gist.github.com/brandonb927/3195465 | |
| #!/bin/sh | |
| # Some things taken from here | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # Ask for the administrator password upfront | 
| #import <Foundation/Foundation.h> | |
| #import <objc/runtime.h> | |
| typedef enum { | |
| PXRPropSerializerTypeUnknown, | |
| PXRPropSerializerTypeFloat, | |
| PXRPropSerializerTypeDouble, | |
| PXRPropSerializerTypeInt, | |
| PXRPropSerializerTypeClass, | |
| PXRPropSerializerTypeBool | 
| #!/usr/bin/python | |
| #original script by Rob Napier <[email protected]> | |
| #updates by github.com/gngrwzrd | |
| #Script to link in all your old SDKs every time you upgrade Xcode | |
| #Create a directory somewhere to store older SDKs in | |
| #Under it, put all the platform directories: | |
| # MacOSX.platform iPhoneOS.platform iPhoneSimulator.platform | |
| #Under those, store the SDKs: | 
| ''' | |
| requires imagemagick to be installed. http://www.imagemagick.org/script/index.php | |
| requires pngquant to be installed if using compression on pngs. http://pngquant.org/ | |
| ''' | |
| import os | |
| import sys | |
| import subprocess | |
| import argparse | |
| import shutil | |
| import mimetypes | 
| ''' | |
| requires imagemagick to be installed. http://www.imagemagick.org/script/index.php | |
| ''' | |
| import os | |
| import sys | |
| import subprocess | |
| import argparse | |
| # defines the input we want to use. Change the directory name or the target DPI to set this. | |
| inputDirName = "drawable-xhdpi" | 
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| #!/bin/sh | |
| # Just copy and paste the lines below (all at once, it won't work line by line!) | |
| # MAKE SURE YOU ARE HAPPY WITH WHAT IT DOES FIRST! THERE IS NO WARRANTY! | |
| function abort { | |
| echo "$1" | |
| exit 1 | |
| } | |
| set -e |