Skip to content

Instantly share code, notes, and snippets.

@btburton42
btburton42 / electronica.json
Last active August 29, 2015 14:07
Electronica To Work -- JSON output for StreamUS Chrome Extension
[
{
"title": "Headless Horseman Boiler Room Live Show",
"id": "aeUmTKGICPw",
"url": "https:\/\/youtu.be\/aeUmTKGICPw",
"author": "Boiler Room",
"duration": "42:22"
},
{
"title": "Steve Bug Boiler Room Berlin DJ Set",
@btburton42
btburton42 / Key Bindings
Last active August 29, 2015 14:14
Sublime Text Settings
[
{ "keys": ["super+f"], "command": "show_panel", "args": {"panel": "replace", "reverse": false} },
{ "keys": ["super+alt+down"], "command": "duplicate_line" },
{ "keys": ["super+shift+d"], "command": "delete_lines"},
{ "keys": ["alt+up"], "command": "swap_line_up" },
{ "keys": ["alt+down"], "command": "swap_line_down" },
{ "keys": ["option+b"], "command": "toggle_side_bar" }
]
@btburton42
btburton42 / .eslintrc
Created May 4, 2015 23:07
JSCS & ESLint Config files
{
"parser": "babel-eslint",
"plugins": ["react"],
"env": {
"es6": true,
"browser": true,
"node": true,
"mocha": true
},
"rules": {
@btburton42
btburton42 / parsely-password.js
Last active November 14, 2018 04:58
ParselyJS Custom Validator for Passwords
window.ParsleyValidator.addValidator 'password', (value, requirements) ->
requirements = requirements.split ','
regexPatterns =
upperCase: '[A-Z]'
lowerCase: '[a-z]'
number: '[0-9]'
symbol: '[@#$%^&!*()_+<>]'
isValid = true
for key in requirements
if isValid && regexPatterns[key]?
class BaseClass
instance = null
constructor: ->
if instance
return instance
else
instance = this
# contructor code
@btburton42
btburton42 / jest-debug.json
Created November 14, 2018 04:57
VS Code Debugging
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Jest Debug",
@btburton42
btburton42 / snippet.js
Created December 4, 2018 18:20
Storybook 25 Column Grid Snipet
javascript: (() => {
function insertGrid(str) {
var node = document.createElement('style');
node.innerHTML = str;
var iFrame = document.getElementById('storybook-preview-iframe');
iFrame.contentWindow.document.body.appendChild(node);
}
const audiGrid = ` :root { --audi-grid-color: hsla(290, 87%, 47%, 0.15); --audi-grid: repeating-linear-gradient( to right, var(--audi-grid-color), var(--audi-grid-color) 4%, transparent 4%, transparent 8%, transparent 8% ); } html { position: relative; } html::before { position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: 100%; min-height: 100vh; content: ''; background-image: var(--audi-grid); background-size: 100% 100%; z-index: 999999999999; pointer-events: none; } `;
insertGrid(audiGrid);
})();