Skip to content

Instantly share code, notes, and snippets.

Dexter M Haslem DexterHaslem

View GitHub Profile
View gist:af704520e24e9d126717e3265a4bc74d
return wbfarws.id === wbfarwsToRemove.id || (wbfarws.isUnderInstruction && wbfarws.shipWatchstationId === wbfarwsToRemove.shipWatchstationId)
View flyway2.txt
C:\stamps>gradlew flywaymigrate -i
Starting Build
Settings evaluated using settings file 'C:\stamps\settings.gradle'.
Projects loaded. Root project using build file 'C:\stamps\build.gradle'.
Included projects: [root project 'stamps', project ':optimizer', project ':services']
Evaluating root project 'stamps' using build file 'C:\stamps\build.gradle'.
Configuring agent
Evaluating project ':optimizer' using build file 'C:\stamps\optimizer\build.gradle'.
Compiling build file 'C:\stamps\optimizer\build.gradle' using SubsetScriptTransformer.
Compiling build file 'C:\stamps\optimizer\build.gradle' using BuildScriptTransformer.
View gist:21b3cc689e846c0710ce704e4001de95
C:\STAMPS-ALPHA\Widgets\branches\Sprints\MPOT\OMMulti>npm run build
> om-multi@4.0.0 prebuild C:\STAMPS-ALPHA\Widgets\branches\Sprints\MPOT\OMMulti
> npm run clean-dist && npm run build:html && npm run lint && npm run test
> om-multi@4.0.0 clean-dist C:\STAMPS-ALPHA\Widgets\branches\Sprints\MPOT\OMMulti
> npm run remove-dist && mkdir dist
@DexterHaslem
DexterHaslem / Prefix migrations with timestamp Groovy task
Created May 25, 2016 — forked from jeremyjarrell/Prefix migrations with timestamp Groovy task
A Groovy task that prefixes new SQL migration files with a timestamp precise to milliseconds. The following usage will add a prefix to any SQL file in a hardcoded directory that does not begin with an number and double leading underscore: $ gradle prefixNewMigrations
View Prefix migrations with timestamp Groovy task
task prefixNewMigrations {
fileTree(dir: 'dev/src/db/listhub').exclude({ isFilePrefixed(it.file) }).each { file ->
doLast {
def timestamp = new Date().format('yyyyMMddHHmmssSSS', TimeZone.getTimeZone('GMT'))
println "Renaming $file.name to ${timestamp}__$file.name"
file.renameTo("$file.parentFile.absolutePath$file.separator${timestamp}__$file.name")
@DexterHaslem
DexterHaslem / .gitignore
Last active Mar 15, 2016 — forked from shuhei/.gitignore
An example `gulpfile.js` for CoffeeScript and Browserify and sourcemaps
View .gitignore
/node_modules
/build
@DexterHaslem
DexterHaslem / rr-basename.js
Created Mar 2, 2016
react router 2.0 custom route basename. once again convoluted rocketscience garbage
View rr-basename.js
var ReactRouter = require('react-router');
var createBrowserHistory = require('history/lib/createBrowserHistory');
var createAppHistory = ReactRouter.useRouterHistory(createBrowserHistory);
var appHistory = createAppHistory({
basename: '/ucomparison'
});
// ...
@DexterHaslem
DexterHaslem / .babelrc
Created Feb 29, 2016
gulp MODERN (feb 2016), WORKING babel + react + sourcemaps. millions of outdated bad examples
View .babelrc
{ "presets": ["react"], "sourceMaps": true }
View test2.rkt
#lang racket
(struct fix-tag (tag contents))
(define fix-soh (string (integer->char 01)))
(define (compute-checksum tags)
1)
;; creates tag string with SOH attached
(define (create-tag id contents)
View fix_parse_all.jl
testStr = "8=FIX4.2.\x019=65\x0135=A\x0149=S\x0156=C\x0134=177\x0152=20160125-18:30:55\x0198=0\x01108=30\x0110=065\x01"
soh = Char(0x01)
function fix_parse_split(str)
ret = []
for chunk in split(testStr, soh)
if length(chunk) > 0
push!(ret, chunk)
end
View fix_parse_idx.jl
soh = Char(0x01)
function fix_parse_idx(str)
ret = []
prev_idx = 1
for idx in 1 : length(str)
# beware julia indexing starts at 1!!
if str[idx] == soh && idx > 1
# we want to match parse_split so dont include SOH
chunk = str[prev_idx:idx - 1]
You can’t perform that action at this time.