Skip to content

Instantly share code, notes, and snippets.

View KenCorbettJr's full-sized avatar

Ken Corbett KenCorbettJr

  • Inventory Shield
  • Charlotte, NC
View GitHub Profile
@KenCorbettJr
KenCorbettJr / resume.json
Last active August 10, 2021 16:40
Resume
{
"basics": {
"name": "Ken Corbett",
"label": "Sr Web Developer",
"picture": "",
"email": "[email protected]",
"phone": "330-921-9978",
"website": "",
"summary": "An exceptionally talented Full Stack Developer with 10+ years of experience building high-quality, scalable web experiences. A JavaScript ninja, CSS artist, and HTML expert he is extremely adept with all of the core web technologies. With deep experience with Vue, React, Typescript, Node, Firebase, AWS, and dozens of other languages, frameworks, and libraries Ken is a quick learner, always pushing to improve. While his passion is front-end web development, he is very comfortable working on the backend building JSON REST APIs, structuring databases, maintaining servers, automating testing, fine-tuning build processes, and structuring deployment pipelines. Having worked for startups and giant corporations he knows how to build incredible web experiences that scale and perform.",
"location": {
@KenCorbettJr
KenCorbettJr / gist:e58521dac49c764883ad
Created October 13, 2014 18:14
enyo-bootstrap example widgets
enyo.kind({
name: "App",
kind: "enyo.Scroller", components:[
{kind: "bootstrap.Navbar", brand: "Enyo Boostrap", inverse: true, navbarComponents: [
{kind: "bootstrap.NavbarNav", float: "right", components: [
{kind: "bootstrap.MenuItem", text: "A Small Well", href: "#"},
{kind: "bootstrap.NavDropdown", text: "A Small Well", href: "#", components: [
{kind: "bootstrap.DropdownMenu", components: [
{text: "Dropdown Menu Item 1", href: "#"},
{text: "Dropdown Menu Item 2", href: "#"}
@KenCorbettJr
KenCorbettJr / gist:fc33d0b9616ce8ccb41a
Created October 13, 2014 18:11
enyo-bootstrap form example
enyo.kind({
name: "Example.BootstrapForm",
components: [
{kind: "bootstrap.Container", classes: "main-content", components: [
{kind: "bootstrap.Form", components: [
{kind: "bootstrap.FormGroup", components: [
{kind: "bootstrap.FormControlLabel", content: "Name"},
{kind: "bootstrap.FormControl", name: "recipeTitle", placeholder: "Apple Pie"}
]},
{kind: "bootstrap.FormGroup", components: [
body:before {
content: "";
position: fixed;
top: -10px;
left: 0;
width: 100%;
height: 10px;
-webkit-box-shadow: 0px 0px 10px rgba(0,0,0,.8);
-moz-box-shadow: 0px 0px 10px rgba(0,0,0,.8);
/**
* An implementation for Quicksort. Doesn't
* perform as well as the native Array.sort
* and also runs the risk of a stack overflow
*
* Tests with:
*
* var array = [];
* for(var i = 0; i < 20; i++) {
* array.push(Math.round(Math.random() * 100));
@KenCorbettJr
KenCorbettJr / Underscore Event Debouncer
Last active October 7, 2015 02:27
Event Debouncing
// Returns a function, that, as long as it continues to be invoked, will not
// be triggered. The function will be called after it stops being called for
// N milliseconds. If `immediate` is passed, trigger the function on the
// leading edge, instead of the trailing.
_.debounce = function(func, wait, immediate) {
var timeout;
return function() {
var context = this
, args = arguments,
, later = function() {
// Created by milliseconds
/**
# ms.js
No more painful `setTimeout(fn, 60 * 4 * 3 * 2 * 1 * Infinity * NaN * '☃')`.
ms('2d') // 172800000
ms('1.5h') // 5400000
@KenCorbettJr
KenCorbettJr / getSpecificNodeValue.php
Created March 14, 2012 15:23
PHP: XML: Get Specific Node Value
function specificNodeValue($node, $implode = true) {
$value = array();
if ($node->childNodes) {
for ($i = 0; $i < $node->childNodes->length; $i++) {
if (!(@$node->childNodes->item($i)->tagName)) {
$value[] = $node->childNodes->item($i)->nodeValue;
}
}
}
return (is_string($implode) ? implode($implode, $value) : ($implode === true ? implode($value) : $value));
@KenCorbettJr
KenCorbettJr / JavaScript: underscore conditionals
Created March 12, 2012 18:04 — forked from brianarn/underscore_conditionals.js
JavaScript: Underscore conditional
// A means of using underscore.js to do templates with conditionals
// Inside of underscore's template, it returns a function that uses
// 'with' on a variable named obj, and you can touch into that using
// inline JS and <% %> wrappers
// A template with conditional display of last names:
var good = _.template("Hello: <%= name %> <% if (obj.lastname) { %> <%= lastname %> <% } %>");
// A template that tries to do that, but fails:
var bad = _.template("Hello: <%= name %> <% if (lastname) { %> <%= lastname %> <% } %>");