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| #!/usr/bin/env python | |
| """ | |
| Check that a particular email address exists. | |
| Adam Blinkinsop <[email protected]> | |
| WARNING: | |
| Checking email addresses in this way is not recommended, and will lead to | |
| your site being listed in RBLs as a source of abusive traffic. Mail server | |
| admins do like it when they get connections that don't result in email being | |
| sent, because spammers often use this technique to verify email addresses. |
| if "[email protected]" =~ /@(.*)/ | |
| $1 | |
| else | |
| raise "bad email" | |
| end | |
| # => "example.com" |
| #!/bin/bash | |
| # | |
| # description: Apache Tomcat init script | |
| # processname: tomcat | |
| # chkconfig: 234 20 80 | |
| # | |
| # | |
| # Copyright (C) 2014 Miglen Evlogiev | |
| # | |
| # This program is free software: you can redistribute it and/or modify it under |
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/bash | |
| # setting for proxy | |
| export EC2_JVM_ARGS="-Dhttp.proxySet=true -DproxyHost=YOURPROXYHOST -DproxyPort=YOURPROXYPORT" | |
| export SERVICE_JVM_ARGS=${EC2_JVM_ARGS} | |
| # setting for cloud watch | |
| export AWS_CREDENTIAL_FILE=$AWS_CLOUDWATCH_HOME/credentials | |
| export AWS_CLOUDWATCH_URL=https://monitoring.amazonaws.com | |
| export PATH=$AWS_CLOUDWATCH_HOME/bin:$PATH |
A checklist for designing and developing internet scale services, inspired by James Hamilton's 2007 paper "On Desgining and Deploying Internet-Scale Services."
| # You don't need Fog in Ruby or some other library to upload to S3 -- shell works perfectly fine | |
| # This is how I upload my new Sol Trader builds (http://soltrader.net) | |
| # Based on a modified script from here: http://tmont.com/blargh/2014/1/uploading-to-s3-in-bash | |
| S3KEY="my aws key" | |
| S3SECRET="my aws secret" # pass these in | |
| function putS3 | |
| { | |
| path=$1 |