This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
Creates the sqlite database file | |
*/ | |
function createDB(){ | |
try{ | |
//$db = getDBObject(); | |
$db = new SQLite3('db/prax0rs.db') or die('Unable to open database'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This is a quick tutorial on how to learn dates for CS631. I am not trying to aid in your project but provide some more | |
* insight on how I like to use the Java Date Object. | |
* | |
* NOTE: I just realized that it seems like he wants us to use DateFormatter & Gregorian Calendar, so don't use SimpleDateFormat but the | |
* concepts behind it should be similar. | |
* | |
*/ | |
public void learnDates() throws Exception{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Adding EPEL Repo | |
wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm | |
rpm -ivh epel-release-6-8.noarch.rpm | |
# CDH/Mesos Install | |
curl -sSfL http://archive.cloudera.com/cdh4/one-click-install/redhat/6/x86_64/cloudera-cdh-4-0.x86_64.rpm --output /tmp/cdh.rpm | |
curl -sSfL http://archive.cloudera.com/cdh4/redhat/6/x86_64/cdh/RPM-GPG-KEY-cloudera --output /tmp/cdh.key | |
sudo rpm --import /tmp/cdh.key | |
sudo yum localinstall -y -q /tmp/cdh.rpm | |
sudo rpm -Uvh http://repos.mesosphere.io/el/6/noarch/RPMS/mesosphere-el-repo-6-2.noarch.rpm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
from xml.dom import minidom | |
def getNodeText(node): | |
nodelist = node.childNodes | |
result = [] | |
for node in nodelist: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import os.path, time, sys | |
if len(sys.argv) < 2: | |
print "Error: No file argument provided" | |
exit() | |
file = sys.argv[1] | |
print "last modified: %s" % time.ctime(os.path.getmtime(file)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -XPOST -H "Content-Type: application/json" -d @$1 http://localhost:8080/v2/apps |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -XPOST -H "Content-Type: application/json" -d @$1 http://localhost:8080/v2/apps | |
{ | |
"id": "dynamic-chronos", | |
"cmd": "./chronos --http_port $PORT0", | |
"cpus": 0.2, | |
"disk": 0.0, | |
"instances": 1, | |
"mem": 128.0, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In progress: | |
- authentication with master | |
Ideas: | |
- unit tests | |
- user facing web page with REST data | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
#curl -X POST -H "Content-Type: application/json" localhost:8080/v2/apps -d@Docker2.json | |
import httplib,urllib | |
import os | |
import json | |
class MarathonClient(object): | |
cpus = 1 | |
memory = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
influxdb: | |
image: tutum/influxdb | |
ports: | |
- "8086:8086" | |
- "8083:8083" | |
- "8090:8090" | |
- "8099:8099" | |
environment: | |
- PRE_CREATE_DB=db1 |
OlderNewer