Skip to content

Instantly share code, notes, and snippets.

View kennethkoontz's full-sized avatar

Ken Koontz kennethkoontz

  • Squadformers
  • Squaw Valley, CA
View GitHub Profile
// Cache a function's results by storing them. You may assume
// that the function only takes primitives as arguments.
//
// The function should return a function that, when called, will check if it has
// already computed the result and return that value instead if possible.
//
// Example:
// cacheAdd = myFunction(add);
// add(1,2) = 3
// cacheAdd(1,2) = 3 --> executes add function
@kennethkoontz
kennethkoontz / api.md
Last active September 2, 2020 20:52
API Details

Hubux API

List Respondents

https://data.hubux.com/api/v1/respondents

Lists all respondents.

Example (CURL)

curl --location --request GET 'https://data.hubux.com/api/v1/respondents' \
// in the index.html
<script>
(function () {
var NickelledLaunchers = window['NickelledLaunchers'] = NickelledLaunchers || {};
NickelledLaunchers.preloadEvents = [];
NickelledLaunchers.show = function () {
NickelledLaunchers.preloadEvents.push('show');
};
NickelledLaunchers.hide = function () {
NickelledLaunchers.preloadEvents.push('hide');
@kennethkoontz
kennethkoontz / approaches.jsx
Last active February 11, 2019 18:17
approaches
// data: [
// {
// "key": "first name",
// "prop1": 1,
// "prop2": 2,
// },
// {
body {
background: #002b36;
color: #657c83; }
a {
color: #586f75; }
a:link, a:visited {
color: #586f75; }
import React from 'react';
import '../../../assets/icons.svg';
import './icons.css';
const defaultDimensions = '32';
const Icon = props => (
<svg
width={props.width || defaultDimensions}
height={props.height || defaultDimensions}
import * as React from 'react';
import { css, StyleSheet } from 'aphrodite';
export class Dropdown extends React.Component<any, any> {
constructor(props) {
super(props);
this.state = {
isOpen: false,
selectedOption: {}
};
import * as React from 'react';
import { css, StyleSheet } from 'aphrodite';
export class Dropdown extends React.Component<any, any> {
constructor(props) {
super(props);
this.state = {
isOpen: false,
selectedOption: {}
};
@kennethkoontz
kennethkoontz / update.yml
Created November 28, 2017 19:23
update before beta
before_deploy:
#...
- gcloud --quiet components update beta #this
- gcloud —-quiet components beta update #instead of this
#...
// Ionic Starter App
// angular.module is a global place for creating, registering and retrieving Angular modules
// 'starter' is the name of this angular module example (also set in a <body> attribute in index.html)
// the 2nd parameter is an array of 'requires'
angular.module('starter', ['ionic'])
.run(function($ionicPlatform) {
$ionicPlatform.ready(function() {
if(window.StatusBar) {