Launch the instance and connect with ssh.
##Update the server
sudo yum update
##Install php and MySQL packages
# Make sure you zip up the file first | |
echo "Splitting up archive $1" | |
tar -cvzf $1.tar.gz $1 | |
split -b 1024mb $1.tar.gz $1.tar.gz. |
docker-machine create -d virtualbox dev | |
eval $(docker-machine env dev) | |
docker-machine ls | |
docker-compose build | |
docker-compose up -d | |
echo `docker-machine ip dev` |
WITH RECURSIVE | |
x(i) AS ( VALUES (0) | |
UNION ALL SELECT i + 1 | |
FROM x | |
WHERE i < 101), | |
Z(Ix, Iy, Cx, Cy, X, Y, I) AS ( | |
SELECT | |
Ix, | |
Iy, | |
X :: FLOAT, |
#!/usr/bin/env python | |
# encoding: utf-8 | |
import tweepy #https://github.com/tweepy/tweepy | |
import csv | |
#Twitter API credentials | |
consumer_key = "" | |
consumer_secret = "" | |
access_key = "" |
import random | |
NUMBER_OF_PLAYERS = 5 | |
NUMBER_OF_ITERATIONS = 1000000 | |
def main(): | |
if NUMBER_OF_PLAYERS < 2: | |
raise ValueError("Must have at least 2 people.") | |
if NUMBER_OF_ITERATIONS < 1: |
import redis | |
import threading | |
class Listener(threading.Thread): | |
def __init__(self, r, channels): | |
threading.Thread.__init__(self) | |
self.redis = r | |
self.pubsub = self.redis.pubsub() | |
self.pubsub.subscribe(channels) | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title></title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<link href="" rel="stylesheet" /> | |
<style></style> | |
</head> | |
<body> |
#!/usr/bin/env python2.7 | |
import time | |
_URL = 'http://localhost/tmp/derp.html' | |
_NUMBER = 1000 | |
def test_urllib2(): | |
import urllib2 |
Launch the instance and connect with ssh.
##Update the server
sudo yum update
##Install php and MySQL packages
This is companion code to this guide.