Skip to content

Instantly share code, notes, and snippets.

View jrgleason's full-sized avatar

Jackie Gleason jrgleason

View GitHub Profile
@jrgleason
jrgleason / terminal
Created April 26, 2019 15:40
How I run Mocha
mocha --delay --exit ./test/suite.js
import depcheck from 'depcheck';
import path from "path";
const options = {
withoutDev: false, // [DEPRECATED] check against devDependencies
ignoreBinPackage: false, // ignore the packages with bin entry
skipMissing: false, // skip calculation of missing dependencies
ignoreDirs: [ // folder with these names will be ignored
'dist'
],
import 'vue-material/dist/vue-material.css'
import 'vue-material/dist/theme/default-dark.css'
export default {
data:()=>({
message: "Now it is for real",
title: "Jackie R. Gleason",
menuVisible: false
}),
methods: {
toggleMenu () {
// Express Node app
app.use('/vue', express.static(__dirname + '/node_modules/vue/dist/vue.esm.browser.js'));
app.use('/vue-router', express.static(__dirname + '/node_modules/vue-router/dist/vue-router.esm.js'));
@jrgleason
jrgleason / BasePage.mjs
Created December 18, 2018 16:41
Ref error on external
import {Other} from "./Other"
export class BasePage{
constructor(){
}
}
@jrgleason
jrgleason / BasePage.mjs
Created December 17, 2018 17:58
ES6 Selenium Driver not working with mocha
import webdriver from "selenium-webdriver";
const url = process.env.TEST_UI_URL || "http://localhost:9090/";
const { By } = webdriver;
export class BasePage{
constructor(driver){
if(driver) this.driver = driver;
else{
console.log("Driver is undefined");
const builder = new webdriver.Builder()
.forBrowser("chrome");
@jrgleason
jrgleason / a.mjs
Created October 22, 2018 23:56
Trying to get Webpack to use native node module loader
class A{
static get name(){
return "Hello World";
}
}
export default A;
@jrgleason
jrgleason / test.java
Created March 15, 2018 14:08
Example upload multipart s3
public void uploadFile(MultipartFile file) throws IOException{
long contentLength = file.getBytes().length;
long partSize = 5 * 1024 * 1024;
String key = file.getOriginalFilename();
InitiateMultipartUploadRequest initRequest = new InitiateMultipartUploadRequest(
bucket, key);
InitiateMultipartUploadResult initResponse =
client.initiateMultipartUpload(initRequest);
List<PartETag> partETags = new ArrayList<>();
int partNumber = 1;
@jrgleason
jrgleason / httpPromise.js
Created January 12, 2016 15:16
This is how I handle converting the Node.JS http library over to a promise using Bluebird. This works for both GET and POST.
var http = require('http'),
Promise = require('bluebird');
var PromiseRequest = Promise.method(function(data){
return new Promise(function(resolve,reject){
var request = http.request(data.options, function(res){
var response = null;
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log('Response: ' + chunk);
if(response)
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
java -cp lib/*;structr-ui-1.1-SNAPSHOT-201507052310.b4e80.jar org.structr.Server
Jul 13, 2015 1:59:22 PM org.structr.core.Services initialize
INFO: Reading structr.conf..
Jul 13, 2015 1:59:22 PM org.structr.core.Services getResources
INFO: Found 0 possible resources: []
Jul 13, 2015 1:59:23 PM org.structr.module.JarConfigurationProvider scanResource