Skip to content

Instantly share code, notes, and snippets.

View joshuaebowling's full-sized avatar

Josh Bowling joshuaebowling

View GitHub Profile
@joshuaebowling
joshuaebowling / parse-date-function-body.js
Last active May 4, 2016 19:37
Parse javasscript date to OrientDB date format yyyy-MM-dd HH:mm:ss
/** parameters
//inDate example: Wed, 04 May 2016 19:25:26 GMT
//inMonth example: 4 (which would month number of May if during May you new Date().getMonth())
**/
var strTime, utcDate;
utcDate = inDate.split(' ');
arrTime = utcDate[4].split(':');
@joshuaebowling
joshuaebowling / user.rules
Created May 3, 2016 18:14
Ubuntu UFW Rules
*filter
:ufw-user-input - [0:0]
:ufw-user-output - [0:0]
:ufw-user-forward - [0:0]
:ufw-before-logging-input - [0:0]
:ufw-before-logging-output - [0:0]
:ufw-before-logging-forward - [0:0]
:ufw-user-logging-input - [0:0]
:ufw-user-logging-output - [0:0]
:ufw-user-logging-forward - [0:0]
@joshuaebowling
joshuaebowling / orientdb-custom-function-with-transaction.js
Created May 2, 2016 21:50
orientdb-custom-function-with-transaction.js
var self = this;
self.db.begin();
self.db.commit();
return 'transaction';
@joshuaebowling
joshuaebowling / ubuntu-install-orient-db.sh
Last active June 6, 2017 02:01
Install latest orientdb on Ubuntu 14.04.4
# install java 1.6 because it's faster... per https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-orientdb-on-ubuntu-14-04
sudo add-apt-repository ppa:webupd8team/java -y
# update packages
sudo apt-get update
# install java 8
sudo apt-get install oracle-java8-set-default -y
# get latest orientdb as of scripting date
@joshuaebowling
joshuaebowling / Vagrantfile
Created March 18, 2016 21:55
Install Vagrant and the Vagrant Digital Ocean Provider, then 'vagrant up --provider=digital_ocean'
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure(2) do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
@joshuaebowling
joshuaebowling / each-series-ajax.js
Last active March 11, 2016 16:28
Using Async.js for Ajax Flow Control
var records = [{data:'data1'}, {data:'data2'}];
async.eachSeries(records, function (record, cb) {
// this was inside an angular project, but use whatever ajax call you want here
$http.post('http://myurltopost', record).
success(function (data, status, headers, config) {
cb(null, data);
})
.error(function (data, status, headers, config) {
// called asynchronously if an error occurs
// or server returns response with an error status.
##################### ElasticSearch Configuration Example #####################
# This file contains an overview of various configuration settings,
# targeted at operations staff. Application developers should
# consult the guide at <http://elasticsearch.org/guide>.
#
# The installation procedure is covered at
# <http://elasticsearch.org/guide/en/elasticsearch/reference/current/setup.html>.
#
# ElasticSearch comes with reasonable defaults for most settings,

Total : 15.5-23.5 Hours

High-Level Breakdown

Please Note This Isn't a Structural Outline; Rather it's a Conceptual Grouping of Main Components. Nor are the items listed in any particular order.

Component Description Low High
Datagrid Container for trade data 4 6
Grid Filter Changes what items are displayed via checkbox for each status a trade can have, perhaps adding all/none buttons also 2 3
Trade-specific Interactions Includes Track Transaction, Cancel Selected, Cancel Pending 1 2
Balance Display Shows Current Balance 1 1
var indexof, indexofSub;
indexof = function(haystack, needle) {
// Implementation?
var hayLen, isCompleteMatch, needleLen, result, match;
result = -1;
match = '';
hayLen = haystack['length'];
needleLen = needle['length'];
// Assuming Jasmine
// Assuming NAMESPACE is defined and is as id.js defines it.
describe('Test validity of my changes to id.js', function() {
beforeAll(function() {
// add some "id"s to the Array prototype
var self;
self = this;
self.testData = [
'joshuaebowling', 'posita'
];