Skip to content

Instantly share code, notes, and snippets.

View Josh68's full-sized avatar

Josh Schneider Josh68

View GitHub Profile
@Josh68
Josh68 / Sample
Last active November 12, 2015 06:29
FAQs viewmodel from myModa mobile application
/*jshint smarttabs:true, maxerr:1000, strict:false*/
/*Sample FAQ code*/
var loadViewModel = function(){
//------------------------------------------------------------------------------
//
// MenuItems : Object
// Data object for available menu items.
@Josh68
Josh68 / static_server.js
Created October 19, 2015 18:03 — forked from ryanflorence/static_server.js
Node.JS static file web server. Put it in your path to fire up servers in any directory, takes an optional port argument.
var http = require("http"),
url = require("url"),
path = require("path"),
fs = require("fs")
port = process.argv[2] || 8888;
http.createServer(function(request, response) {
var uri = url.parse(request.url).pathname
, filename = path.join(process.cwd(), uri);
@Josh68
Josh68 / SassMeister-input.scss
Created January 11, 2016 20:39
Generated by SassMeister.com.
// ----
// Sass (v3.4.20)
// Compass (v1.0.3)
// ----
// primary palette
$modernAqua: #0C9C9E;
$teal: $modernAqua;
$tealLight: mix($teal, #fff, 15%);
@Josh68
Josh68 / webpack.config.babel.js
Created May 11, 2018 17:52
patternlab-edition-node-webpack, modify webpack config
// webpack.config.js
const webpack = require('webpack');
const {resolve} = require('path');
const globby = require('globby');
const {getIfUtils, removeEmpty} = require('webpack-config-utils');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const EventHooksPlugin = require('event-hooks-webpack-plugin');
const plConfig = require('./patternlab-config.json');
const patternlab = require('patternlab-node')(plConfig);
const patternEngines = require('patternlab-node/core/lib/pattern_engines');
@Josh68
Josh68 / server.js
Created July 24, 2018 14:01
Patternlab V3 server lib
'use strict';
const path = require('path');
const liveServer = require('@pattern-lab/live-server');
const events = require('./events');
const logger = require('./log');
const server = patternlab => {
const _module = {
@Josh68
Josh68 / compilation-files-changed-plugin.js
Created July 25, 2018 05:50
Determine whether to run patternlab build based on changed files in a compilation
import patternEngines from 'patternlab-node/core/lib/pattern_engines';
import plConfig from '../../../patternlab-config.json';
const pluginName = 'CompilationFilesChangedPlugin';
class CompilationFilesChangedPlugin {
constructor({ patternlab }) {
this.startTime = Date.now();
this.prevTimestamps = new Map();
this.pluginIterator = 0;
@Josh68
Josh68 / keybase.md
Created February 16, 2021 17:12
keybase.md

Keybase proof

I hereby claim:

  • I am josh68 on github.
  • I am josh68 (https://keybase.io/josh68) on keybase.
  • I have a public key ASCKSzF4mHP6SpLGLqDjUs457N2nd2XE968AoaeiNkpxmwo

To claim this, I am signing this object:

@Josh68
Josh68 / .browserslistrc
Last active February 24, 2021 05:32
Test API with caniuse and a given browserslist
>0.2%
not dead
not ie < 11
not op_mini all
not safari 5.1
@Josh68
Josh68 / cypress_env_example.js
Created May 20, 2021 16:44
Cypress using .env variables
/**
* All files in /cypress/plugins, but only index.js needs to be there
* With Webpack (and now just modern Node) most imports and exports could be ES6, AFIAK
* index.js still does a `module.exports`
*
* Plugins enable you to tap into, modify, or extend the internal behavior of Cypress.
* @see https://on.cypress.io/plugins-guide
*/
/**
@Josh68
Josh68 / dabblet.css
Last active December 14, 2022 21:22 — forked from LeaVerou/dabblet.css
Flexible multiline definition list
/**
* Flexible multiline definition list
*/
dl { width: 200px; display: grid; grid-template-columns: 1fr 80%; gap: .5em .25em; }
dt { counter-increment: css-counter 1; font-weight: bold; white-space: nowrap; }
dt::before { content: counter(css-counter)". "; font-weight: normal; }
dt::after { content: ":"; }