Skip to content

Instantly share code, notes, and snippets.

View jrgleason's full-sized avatar

Jackie Gleason jrgleason

View GitHub Profile
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
@jrgleason
jrgleason / Data
Last active June 26, 2017 18:36
Keylines directive
{"nodes":[{"name":"NJA","title":"NJA","id":8},{"desc":"Jet planes that go really fast.","name":"Hawker 800XP","title":"Hawker 800XP","id":29},{"name":"Some Conference","title":"Some Conference","id":4},{"name":"Jackie","title":"Jackie","id":25},{"contents":"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus sollicitudin, massa at faucibus porta, nulla ligula condimentum erat, in mattis dolor justo et nunc. Praesent quis ex sit amet est elementum ornare vel sit amet metus. Suspendisse accumsan sapien sed nisi finibus, ac feugiat nulla vehicula. Proin rhoncus in orci vel eleifend. Integer in nisl in sem varius commodo sed eget leo. Phasellus faucibus libero id neque rhoncus, id vestibulum diam bibendum. Proin tincidunt elit non tristique feugiat. Nulla pretium eros in tortor venenatis, in scelerisque est auctor. Integer sed auctor nisi. Suspendisse potenti. Suspendisse potenti. Nunc sed fringilla ligula.\n\nNulla tempor efficitur arcu accumsan mollis. Nulla porttitor ullamcorper nisi, non cursus j
chart.createLink(nodeId, newLinkId, {style: newLinkStyle}, function(linkedId){
if(linkedId){
var fromNode = chart.getItem(nodeId);
var toNode = chart.getItem(linkedId);
if(fromNode && toNode){
//great we have them both so now we are ready to save.
console.log("Linking from "+JSON.stringify(fromNode)+" to "+JSON.stringify(toNode));
}
else{
console.log("One side of the link is missing");