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 | |
| # Some things taken from here | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # Set the colours you can use | |
| black='\033[0;30m' | |
| white='\033[0;37m' | |
| red='\033[0;31m' | |
| green='\033[0;32m' |
| #!/bin/sh | |
| # Alot of these configs have been taken from the various places | |
| # on the web, most from here | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # Set the colours you can use | |
| black='\033[0;30m' | |
| white='\033[0;37m' | |
| red='\033[0;31m' |
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 8000There are so many great GIFs out there and I want to have copies of them. Twitter makes that harder than it should be by converting them to MP4 and not providing access to the source material. To make it easier, I made a bash pipeline that takes a tweet URL and a filename, extracts the MP4 from that tweet and uses ffmpeg to convert back to GIF.
brew install ffmpegapt install ffmpeg| #!/bin/bash | |
| # Author: Jay Dansand, Technology Services, Lawrence University | |
| # Date: 10/17/2014 | |
| # OpenSSL requires a port specification; default to 443. | |
| SERVER="$1:443" | |
| SERVER_HOST=$(echo "$SERVER" | cut -d ":" -f 1) | |
| SERVER_PORT=$(echo "$SERVER" | cut -d ":" -f 2) | |
| if [[ -z "$SERVER_HOST" || -z "$SERVER_PORT" ]]; then | |
| echo "Usage: $0 host[:port] [ciphers [delay in ms]]" |