Skip to content

Instantly share code, notes, and snippets.

@ajwagner777
ajwagner777 / Dynamic-React-Components.js
Created March 14, 2016 13:27
A way to dynamically specify React.js components
import React, { Component } from "react"
import OCFacetText from "./oc-facet-text"
import OCFacetNumber from "./oc-facet-number"
import OCFacetNumberRange from "./oc-facet-numberrange"
import OCFacetBoolean from "./oc-facet-boolean"
import OCFacetCheckbox from "./oc-facet-checkbox"
import OCFacetRadio from "./oc-facet-radio"
import OCFacetDate from "./oc-facet-date"
import OCFacetDateTime from "./oc-facet-datetime"
@ajwagner777
ajwagner777 / ITAMS.md
Last active March 7, 2016 00:43
A brief description of the ITAMS project

ITAMS stands for IT Asset Management System (creative, right?)

I led a team of 3 developers, myself included.

My team's process was actually very simple. We met with stakeholders to gain visibility into the problem at hand. Each school (6 entities in total) had their own decentralized process for tracking IT assets (or in one case, no process at all). There was no way to know if a computer had an encrypted hard drive or not, where the asset was physically located, who was responsible for it, or what it's disposition was (or would be). There was obviously a lot more to what was needed, but that's the high level.

One thing that I did not want to do (as much as was possible) was just "gather requirements". I have found this to be counter-productive in so many ways. Instead, the approach I took with my team and stakeholders was to really dig into the problem, and get to the root cause. From there my team and I were able to devise a strategy that addressed the underlying issues, which made everyone ha

@ajwagner777
ajwagner777 / Go UTHealth.md
Last active March 7, 2016 00:28
A brief description of the Go UTHealth Project

Early on in my career, when I began to get interested in project management, I started looking for problems that needed solving. At the time, I was working for UTHealth, at the School of Public Health. During my tenure with the university, I began to sense the need for a URL shortening service that was branded. Because multiple schools and marketing departments were interested, I took this on as my first real "project".

I spoke with interested parties to get an idea what they needed. In addition, I worked with database engineers, infrastructure administrators, and designers to end up with the product that we needed.

I wrote the application, working with input from all the stakeholders mentioned above. And for my first real project, it was a wild success; the application is still in use to this day!

The reason that I mention this project, it that it created an appetite in me to make a career of this. Not just engineering, but real project/product management.

buildNotification: function (statuses, customerId) {
var handlebars = require('handlebars');
var source = fs.readFileSync(config.root + "/src/utilities/notification-email.html").toString();
var template = handlebars.compile(source);
return template({statuses: statuses, customerId: customerId});
}

I recently combined GitHub accounts, and couldn't find a way to transfer gists easily. So I got some of the good ones, and dumped the rest. There's more, but be kind, and don't judge me too harshly.

if (args.help || !args.safeIds || !args.permission || !args.setting) {
var help = "\n\nThis utility helps to update users' permissions enmasse. \nThe utility expects the following parameters (REQUIRED):\n" +
"-----------------------------------------------------------------------------------------\n" +
"\t--safeIds=String\t\t-- Comma separate list of Safe IDs (NOT the serials)\n" +
"\t--permission=String\t-- Should be a single permission parameter\n" +
"\t--setting=String\t-- Value to pass to the safe for the permission (usually TRUE or FALSE)\n" +
" \n" +
"Optional parameters: \n" +
"\t--type=Enum\t\t-- Should be a comma separated list of EmployeeTypes (Exec,Manager,Clerk)\n" +
"\t\t\t\t (Defaults to Clerk, Courier is ignored)\n" +
var env = process.env.NODE_ENV || 'development';
var config = {
development: {},
test: {}
production: {}
}
module.exports = config[env];
getRandomInt: function (min, max) {
return Math.floor(Math.random() * (max - min + 1)) + min;
}
getDiff: function (fromFile, fromSafe) {
var diffs = [];
if (fromFile.users)
fromFile = fromFile.users;
if (fromSafe.Response)
fromSafe = fromSafe.Response.EmployeeData.Employee;
for (let i = 0; i < fromFile.length; i++) {
@ajwagner777
ajwagner777 / Teapot.js
Created March 2, 2016 23:01
All time favorite HTTP Status Code
teapot: function (data) {
var body = {
friendlyMessage: data.friendlyMessage || Status.TEAPOT,
message: statusMessage(Status.TEAPOT)
};
jsonResponse(data.res, body, { status: Status.TEAPOT });
}