Skip to content

Instantly share code, notes, and snippets.

View prokizzle's full-sized avatar

Nick Prokesch prokizzle

View GitHub Profile
prokizzle / ExampleComponent.js
Last active July 14, 2021 00:55
useFeatureFlag Example
View ExampleComponent.js
import React from 'react';
import useFeatureFlag from './useFeatureFlag';
import RecommendationsComponent from './Recommendations.js';
const {
DecoratedComponent: Recommendations,
featureEnabled: recommendationsFeatureEnabled,
} = useFeatureFlag({
Component: RecommendationsComponent,
prokizzle / webpack.config.js
Last active May 9, 2020 05:10
Feature Flags
View webpack.config.js
const { filter, test, keys, fromPairs, map, match } = require('ramda');
const env = dotenv.config({ path: ".env.local" }).parsed;
const featureKeys = filter(test(/^FEATURE/), keys(env));
const FeatureFlags = fromPairs(map(key => [match(/FEATURE_([\w\W]+)/, key)[1], env[key]], featureKeys));
module.exports = {plugins: [new webpack.DefinePlugin({ ...env, FeatureFlags })]};
prokizzle / CodeEvalBox.js
Last active July 31, 2018 00:30
Adds a textarea to the top of the page that can execute javascript within the page. Useful for testing code on mobile browsers.
View CodeEvalBox.js
var codeEval = document.createElement('div');
var inputBox = document.createElement('textarea', { rows: 200, cols: 800 });
var evalButton = document.createElement('button');
var buttonText = document.createTextNode('Eval');
document.body.insertBefore(codeEval, document.body.firstElementChild);
evalButton.addEventListener('click', function () { eval(inputBox.value)});
# (optional) You might need to set your PATH variable at the top here
# depending on how you run this script
# Hosted Zone ID e.g. BJBK35SKMM9OE
ZONEID="enter zone id here"
# The CNAME you want to update e.g.
prokizzle / custom.paths.zsh
Created September 7, 2015 22:24
Oh-My-Zsh custom paths
View custom.paths.zsh
prokizzle / inject.js
Created September 7, 2015 22:00
Javascript External CSS Injector
View inject.js
var Inject = {
externalCSS: function(href) {
var css = document.createElement('link');
css.href = href;
css.type = 'text/css';
css.rel = 'stylesheet';
var head = document.getElementsByTagName('head')[0];
fontAwesome: function(){
prokizzle / .default-gems
Created September 4, 2015 20:20
Chruby Default Gems Installer
View .default-gems
# Chruby Default Gem Installer
# Install gems for all installed versions of ruby
# by Nick Prokesch
source /usr/local/share/chruby/
prokizzle / email_validation.js
Last active August 29, 2015 14:27
Foundation Abide Async Unique Email Validation
View email_validation.js
// from
(function($) {
$.fn.markInvalid = function(text) {
$(this).filter(":input").each(function(i, el) {
var input = $(el);
var container = input.closest(".row");
var label = container.find(".prefix");
var error = container.find("small.error");
prokizzle / bucket_policy.js
Created August 20, 2015 23:36
AWS S3 Bucket CDN Default Public Policy
View bucket_policy.js
"Id":"http referer policy example",
"Sid":"readonly policy",
prokizzle /
Last active August 29, 2015 14:16 — forked from jookyboi/
CSS libraries and guides to bring some order to the chaos.


  • 960 Grid System - An effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.
  • Compass - Open source CSS Authoring Framework.
  • Bootstrap - Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
  • Font Awesome - The iconic font designed for Bootstrap.
  • Zurb Foundation - Framework for writing responsive web sites.
  • SASS - CSS extension language which allows variables, mixins and rules nesting.
  • Skeleton - Boilerplate for responsive, mobile-friendly development.