Skip to content

Instantly share code, notes, and snippets.

View stevewithington's full-sized avatar
⛑️
solving problems

steve withington stevewithington

⛑️
solving problems
View GitHub Profile
@stevewithington
stevewithington / TweetPresenter.js
Created November 2, 2017 14:18 — forked from jevakallio/TweetPresenter.js
Tweet Presenter!
// paste this to chrome console on anybody's twitter page
// and it'll turn into an instant presentation :)
(function TweetPresent() {
const presenter = $(`<div id="tpd" style=" position: fixed; top: 0; left: 0; height: 100vh; width: 100vw; padding: 10vh 10vw; box-sizing: border-box; background-color: white; font-size: 5vw; text-align: center; z-index: 9999; display: flex; align-items: center; justify-content: center;"></div>`);
const tweets = $$(`div.tweet p.js-tweet-text`)
.map(el => el.innerHTML)
.map(t => ({t, s: Math.random()}))
.sort((a, b) => a.s > b.s ? -1 : 1)
.map(c => c.t);

DOCKER FIRST (Webinar)

7.1 was designed with a Docker first work flow in mind.

Docker allows increased support for Continuous Deployment and Testing, Multi-Cloud Platforms, Environment Standardization and Version Control. As well as better Isolation and Security (stolen from https://dzone.com/articles/5-key-benefits-docker-ci)

@stevewithington
stevewithington / S3Wrapper.cfc
Created February 9, 2018 19:48 — forked from christierney402/S3Wrapper.cfc
Amazon Web Services (AWS) S3 Wrapper for ColdFusion
/**
* Amazon S3 REST Wrapper
* Version Date: 2015-09-03
*
* Copyright 2015 CF Webtools | cfwebtools.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
@stevewithington
stevewithington / README.md
Created March 22, 2018 21:08 — forked from mattlevine/README.md
Super Simple CaaS example

Super Simple CaaS Example

This is just an example to build upon and in no way represents best practice. You most like would use a web component framework like React.js or Vue.js with Mura.js rather than vanilla js.

For this to work:

  1. You must be on Mura 7.1.137 or greater

  2. set your site's contentRenderer.cfc's this.hashURLs=true;

'use strict'
const fs = require('fs')
// Save this list as `eng_10k.txt`: https://raw.githubusercontent.com/first20hours/google-10000-english/master/google-10000-english.txt
const _getFrequencyList = () => {
const frequencyList = fs.readFileSync(`${__dirname}/eng_10k.txt`).toString().split('\n').slice(1000)
const dict = {};
frequencyList.forEach(word => {
// Ignore weird consonant clusters
// match returns `null` if `word` contains no vowels
@stevewithington
stevewithington / Angular-cli.md
Last active April 19, 2019 00:40 — forked from cortesben/Angular-cli.md
Bash commands and Angular CLI commands

Angular-cli

https://cli.angular.io/reference.pdf

Commands Description
ng help returns all commands with flags they can take as a param
ng new [project-name] create a brand new angular project with live server BANG!
ng init grabs name from folder that already exist
ng build builds the production version of project
onSelectUser(participantId:string) {
this.participantsService.findParticipantById(parseInt(participantId))
.debug("Loading participant from backend")
.subscribe(
participant => {
...
},
console.error
);
import { async, ComponentFixture, TestBed, fakeAsync, tick } from '@angular/core/testing';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { Router, RouterModule } from '@angular/router';
import { NgModuleFactoryLoader, Component, NgModule } from '@angular/core';
import { RouterTestingModule } from '@angular/router/testing';
import { routes } from './app-routing.module'
import { Location } from '@angular/common';
describe('PageNotfoundComponent', () => {
let component: AppComponent;
@stevewithington
stevewithington / fancy-tabs-demo.html
Created June 4, 2019 16:43 — forked from ebidel/fancy-tabs-demo.html
Fancy tabs web component - shadow dom v1, custom elements v1, full a11y
<script>
function execPolyfill() {
(function(){
// CustomElementsV1.min.js v1 polyfill from https://github.com/webcomponents/webcomponentsjs/tree/v1/src/CustomElements/v1.
/*
Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
@stevewithington
stevewithington / auto-increment-npm
Created March 30, 2021 22:43 — forked from LukePammant/auto-increment-npm
Auto-increment NPM package in Azure Pipelines and publish to Azure Artifacts
trigger:
branches:
include:
- develop
- master
paths:
include:
- ./
resources: