This file contains hidden or 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
#!/bin/bash | |
function detectBin { | |
which $1 > /dev/null | |
RET=$? | |
if [ $RET = "1" ]; then | |
echo "You need to install $1" | |
exit -1 | |
fi | |
} |
This file contains hidden or 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
Jul 16 21:28:18 ip-172-17-92-86.ec2.internal mesos-slave[25713]: F0716 21:28:18.562685 25721 slave.cpp:2701] CHECK_READY(future): is FAILED: Failed to open '/var/lib/mesos/slave/meta/slaves/20150709-204237-979308972-5050-1530-S8/frameworks/20150708-220956-1314001324-5050-1837-0000/executors/backuptest.48a58025-2bec-11e5-8f62-56847afe9799/runs/352b8f0d-6628-4f34-bc31-57994fac4b00/tasks/backuptest.48a58025-2bec-11e5-8f62-56847afe9799/task.updates' for status updates Failed to handle status update TASK_FAILED (UUID: 1fcbefde-4dcb-48fd-88ac-a9a5b9a7f987) for task backuptest.48a58025-2bec-11e5-8f62-56847afe9799 of framework 20150708-220956-1314001324-5050-1837-0000 | |
Jul 16 21:28:18 ip-172-17-92-86.ec2.internal mesos-slave[25713]: *** Check failure stack trace: *** | |
Jul 16 21:28:18 ip-172-17-92-86.ec2.internal mesos-slave[25713]: @ 0x7fce470e39fd google::LogMessage::Fail() | |
Jul 16 21:28:18 ip-172-17-92-86.ec2.internal mesos-slave[25713]: @ 0x7fce470e589d google::LogMessage::SendToLog() | |
Jul 16 21:28:18 ip-172 |
This file contains hidden or 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
const | |
_ = require ('helpers').http, | |
R = require ('ramda'), | |
T = require ('data.task'), | |
M = require ('control.monads'), | |
mysql = require ('mysql'), | |
Q = require ('query-builder'), | |
C = require ('cassandra-driver'), |
This file contains hidden or 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 and dirty script for copying files in AWS S3 to other buckets. | |
* This is written so it can work across AWS accounts. | |
* You can hack in code to apply work or logic to each file. | |
* | |
* For each file, it downloads locally to a tmp file and then starts uploading as soon as possible | |
* and deletes the file immediately when the upload is done. | |
* | |
* Best way to use: Spin up a micro in EC2, install node.js, | |
* create a directory and install the dependencies with |
This file contains hidden or 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
API.LMSSetValue("cmi.core.lesson_status", "passed") | |
API.LMSSetValue("cmi.core.score.raw", "100") | |
API.LMSSetValue("cmi.core.session_time", "04:32:38.29") | |
API.LMSCommit ("") | |
API.LMSFinish ("") |
This file contains hidden or 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/env node | |
var | |
rules = [ 'Rule of Modularity: Write simple parts connected by clean interfaces.', | |
'Rule of Clarity: Clarity is better than cleverness.', | |
'Rule of Composition: Design programs to be connected to other programs.', | |
'Rule of Separation: Separate policy from mechanism; separate interfaces from engines.', | |
'Rule of Simplicity: Design for simplicity; add complexity only where you must.', | |
'Rule of Parsimony: Write a big program only when it is clear by demonstration that nothing else will do.', | |
'Rule of Transparency: Design for visibility to make inspection and debugging easier.', | |
'Rule of Robustness: Robustness is the child of transparency and simplicity.', |
This file contains hidden or 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
var R = require ('ramda'), | |
M = require ('control.monads'), | |
bp = require ('body-parser'), | |
fs = require ('fs'), | |
express = require ('express'), | |
log = console.log, | |
logI = console.logI, |
This file contains hidden or 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
<!doctype html> | |
<html ng-app="FloFlo"> | |
<head> | |
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css" rel="stylesheet"> | |
</head> | |
<body> | |
<h1>Hello World</h1> | |
<div id="main"> |
This file contains hidden or 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
/* jshint laxbreak: true, laxcomma: true */ | |
(function (R, F, M, A) { | |
var log = function (x) { console.log (x); return x; }, | |
mkSensorUrl = function (unit) { return 'http://10.50.2.213:8080/v2/units/' + unit + '/sensors'; }, | |
mkChart = R.curry (function (el, label) { | |
return new Highcharts.Chart({ chart: { renderTo: el | |
, defaultSeriesType: 'line' } | |
, title: { text: 'Live '+label+' data' } |
This file contains hidden or 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
<!doctype html> | |
<html ng-app="FloFlo"> | |
<head> | |
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css" rel="stylesheet"> | |
</head> | |
<body> | |
<h1>Hello World</h1> | |
<div id="main"> |