Skip to content

Instantly share code, notes, and snippets.

View diverted247's full-sized avatar

Ted Patrick diverted247

View GitHub Profile
@diverted247
diverted247 / inputtext.js
Created December 7, 2017 16:15
Vue Component Wrapping <input>
Vue.component( 'inputtext' , {
template:'<input type="text" :value="value" @input="input($event.target.value)" @change="change" @keyup="keyup" @keypress="keypress" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" >',
props:['value'],
methods:{
input( newInput ){
this.$emit('input', newInput);
},
change(){
//console.log( 'change: ' + this.value );
if( this.$el.maxlength && this.$el.value.length > this.$el.maxlength ){
{
"order": {
"userProfile": {
"street2": "",
"isLogin": true,
"street1": "10955 La Cantera Pkwy",
"lastName": "Patrick",
"businessName": null,
"zipcode": "78256",
"state": "TX",
@diverted247
diverted247 / gist:9533efac917a40a18755086784a5d043
Created March 13, 2017 22:43
Export 4K Video from Powerpoint
Sub Export4KPowerpoint()
If ActivePresentation.CreateVideoStatus <> ppMediaTaskStatusInProgress Then
ActivePresentation.CreateVideo FileName:=Environ("USERPROFILE") & "\Desktop\export.mp4", _
UseTimingsAndNarrations:=True, _
VertResolution:=2160, _
FramesPerSecond:=30, _
Quality:=100
Else: MsgBox "There is another conversion to video in progress"
End If
End Sub
@diverted247
diverted247 / Welcome.html
Created October 1, 2016 18:10
TypeScript Modules for Vue. Using namespaces with AMD loader.
<div class="div__center-content">
<div style="padding-top:1em">
<p v-if="institution.showPersonalization==true" class="welcome__text-welcome">{{* lang.welcome.text.welcome}}{{welcomeName}}</p>
<p class="h4 welcome__text-title">{{* lang.welcome.text.title }}</p>
<p class="h11 welcome__text-subtitle">{{* lang.welcome.text.subTitle }}</p>
</div>
<checkcarousel></checkcarousel>
<div class="h5" v-if="activeProduct.isBusinessProduct">{{ activeProduct.name }}</div>
<div v-if="order.placedOn != ''"><span class="welcome__text-order">{{* lang.welcome.text.order }} {{lastCheckOrderDate}} </span> | <a class="welcome__text-status" :href.once="'/express-checkout/link/orderstatus/' + linkToken" @click="status">{{* lang.welcome.text.status }}</a></div>
<div class="pure-u-1 welcome__btn">
@diverted247
diverted247 / app.js
Last active September 17, 2016 16:00
Async loading pattern for loading Vue components as modules and wiring via vLoad
//setup component to load async when used
//VLoad returns an async function(resolve, reject) {...}
//this will
Vue.component( 'arrowback' , VLoad( 'component.js' ) );
new Vue({
el: 'body',
template:"<arrowback></arrowback>"
});
@diverted247
diverted247 / efs.config
Created August 19, 2016 17:15
Elastic Beanstalk + EFS where deployment does not delete mount contents
packages:
yum:
nfs-utils: []
commands:
0_umount_efs:
command: sudo umount /efs_mount;
ignoreErrors: true
files:
@diverted247
diverted247 / puzzles.txt
Last active July 30, 2016 16:09
Sudoku game puzzle data format. Each line is a game... rating|game|solution
0|,,,,,,5,,1,,3,,,,1,,7,,,,,,,,,0,,1,,,,8,6,,,,,6,,,0,,,,5,0,,,5,,3,,2,8,,,,,,,2,,,8,,,7,,,,4,3,,0,7,,2,,,,|7,4,0,8,3,2,5,6,1,2,3,6,0,5,1,8,7,4,5,8,1,6,7,4,3,0,2,1,2,5,4,8,6,7,3,0,3,6,8,2,0,7,4,1,5,0,7,4,5,1,3,6,2,8,6,5,3,1,4,0,2,8,7,8,1,2,7,6,5,0,4,3,4,0,7,3,2,8,1,5,6
0|,,,,,,,,,3,7,,,,,,,8,4,,,6,1,,,2,3,,,,,,2,5,,7,7,,,,,8,4,1,,,0,,,,,,,,0,,5,1,,6,,,,,3,,,5,,,7,,,,,,,0,1,,|6,2,0,4,8,3,7,5,1,3,7,1,0,2,5,6,4,8,4,5,8,6,1,7,0,2,3,8,1,4,3,6,2,5,0,7,7,6,3,5,0,8,4,1,2,5,0,2,7,4,1,3,8,6,0,8,5,1,7,6,2,3,4,1,3,6,2,5,4,8,7,0,2,4,7,8,3,0,1,6,5
0|,5,,,,,,0,4,,,0,,,5,,,,,,,,2,,5,,6,6,,,,,7,1,2,,,1,,2,,,,,,,8,3,5,,,,,,,,,,,,,3,,,2,7,,,,4,,8,,,,,6,,,1,|8,5,2,6,7,1,3,0,4,4,6,0,3,8,5,2,7,1,3,7,1,0,2,4,5,8,6,6,0,5,8,4,7,1,2,3,7,1,4,2,3,6,8,5,0,2,8,3,5,1,0,6,4,7,1,4,6,7,5,8,0,3,2,5,2,7,1,0,3,4,6,8,0,3,8,4,6,2,7,1,5
0|,8,,,,7,,3,,3,,4,6,,,5,,,,,,1,,,,,6,,,0,,8,,,2,,5,,,,,,3,,,,,,,,,1,,,7,,1,,,,0,5,,,,5,2,,,,,,,3,,7,,4,,6,|1,8,6,5,4,7,2,3,0,3,0,4,6,2,8,5,1,7,2,5,7,1,0,3,4,8,6,4,7,0,3,8,1,6,2,5,5,1,8,0,6,2,3,7,4,6,2,3,4,7,5,1,0,8
@diverted247
diverted247 / gulpfile.js
Last active July 1, 2016 17:33
Gulp PostCSS Configuration
var gulp = require('gulp');
var postcssImport = require('postcss-import');
var autoprefixer = require('autoprefixer');
var customProperties = require("postcss-custom-properties");
var calc = require("postcss-calc")
var processors = [ postcssImport(), customProperties(), calc() , autoprefixer({browsers: ['> 1%','last 2 versions']}) ];
var postcss = require('gulp-postcss');
var rename = require("gulp-rename");
var minimist = require('minimist');
var options;
@diverted247
diverted247 / .elasticbeanstalk_config.yml
Last active May 12, 2020 15:36
AWS EB - Golang Binary Server Deployment
branch-defaults:
default:
environment: test
group_suffix: null
global:
application_name: test
default_platform: Go 1.4
default_region: us-west-2
@diverted247
diverted247 / webhook.py
Created April 14, 2016 18:05
Webhook for smtp server
# -*- coding: utf-8 -*-
import logging
import requests
from .base import Extension
log = logging.getLogger('hermes')