Skip to content

Instantly share code, notes, and snippets.

View mhakes's full-sized avatar

Matt Hakes mhakes

View GitHub Profile
This file has been truncated, but you can view the full file.
*M-UNKNOWN MEXICAN TRUCKING COMPANY
8CON CONTSHIP CONTAINER LINE
99M UNKNOWN MEXICAN OVERLAND CARRIER
AAAB AAA MOTORS
AAAC AAACTION TRANSPORTATION INC
AAAD A A A DELIVERY INC
AAAG ATC LOGISTICS INC
AAAO AAMODT INC
AAAU ASIA CONTAINER LEASING CO LTD
AAAW AAA WALKER TRANSPORTATION SERVICES
@mhakes
mhakes / mirror.js
Created May 12, 2017 01:48
Track changes to an object (very useful in form change tracking)
/* jshint esnext: true */
/* global _ */
/* this version leverages _ lodash - oh Lord, stuck in lodash again */
const formatData = thing => {
if (_.isNil(thing)) {
return thing;
}
if (_.isEmpty(thing)) {
return thing;
}
@mhakes
mhakes / FlippingBinary.markdown
Last active August 29, 2015 14:19
FlippingBinary
@mhakes
mhakes / Denton.markdown
Last active August 29, 2015 14:17
Denton

Denton

A Pen by mhakes on CodePen. This Constructor takes a jQuery form element, and allows for: beautifying, formatting, interacting, validating, populating and cultivating of the form. Purposely did not use $.fn to extend jQuery. Bootstrap used in this example

License.

@mhakes
mhakes / formatData.js
Last active August 29, 2015 14:02
underscorejs/lodash mixin that will return the numeric values (stored as strings) in an property, object, array or combination as well as strip slashes
function formatData(thing) {
function sanitizeString(str) {
// discuss at: http://phpjs.org/functions/stripslashes/
// original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
// improved by: Ates Goral (http://magnetiq.com)
// improved by: marrtins
// improved by: rezna
// fixed by: Mick@el
// bugfixed by: Onno Marsman
// bugfixed by: Brett Zamir (http://brett-zamir.me)