This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"version":1,"notes":"","documentation":"\"This file is a QMK Configurator export. You can import this at <https://config.qmk.fm>. It can also be used directly with QMK's source code.\n\nTo setup your QMK environment check out the tutorial: <https://docs.qmk.fm/#/newbs>\n\nYou can convert this file to a keymap.c using this command: `qmk json2c {keymap}`\n\nYou can compile this keymap using this command: `qmk compile {keymap}`\"\n","keyboard":"pinky/4","keymap":"tom1","layout":"LAYOUT","layers":[["KC_GESC","KC_1","KC_2","KC_3","KC_4","KC_5","KC_6","KC_7","KC_8","KC_9","KC_0","KC_MINS","KC_EQL","KC_GRV","KC_TAB","KC_Q","KC_W","KC_E","KC_R","KC_T","KC_LBRC","KC_RBRC","KC_Y","KC_U","KC_I","KC_O","KC_P","KC_BSLS","KC_LCTL","KC_A","KC_S","KC_D","KC_F","KC_G","KC_HOME","KC_END","KC_H","KC_J","KC_K","KC_L","KC_SCLN","KC_QUOT","KC_LSFT","KC_Z","KC_X","KC_C","KC_V","KC_B","KC_BSPC","KC_SPC","KC_N","KC_M","KC_COMM","KC_DOT","KC_SLSH","KC_RSFT","KC_LALT","MO(1)","KC_LGUI","KC_DEL","KC_ENT","TT(1)","KC_NO","KC_NO"],["KC_N |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@mixin triangle($direction, $size, $color) { | |
width: 0; | |
height: 0; | |
border: $size solid transparent; | |
border-#{$direction}: $size solid $color; | |
} | |
// div { @include triangle(left, 20px, #BADA55); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// convert object of objects to array of objects | |
const arr = Object.keys(obj).map(i => obj[i]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Middleware; | |
use Closure; | |
class Cors | |
{ | |
/** | |
* Handle an incoming request. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Set the height to that of the tallest element for all shared selectors | |
* selector string querySelectorAll | |
* responsive bool whether or not to reset height before calculating tallest | |
**/ | |
function eqHeight(selector, responsive = true) { | |
var findClass = document.querySelectorAll(selector); | |
// if we don't find any of the elements...back out. | |
if (!findClass.length) return; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Creates the boilerplate CSS for flexbox columns. | |
* Apply to a container where its immediate descendants have a class name of | |
* "col-#" where # is the number of columns you would see in a row | |
* You can provide a map of width overrides where you specify screen width and your desired column count | |
* @param {string} $base_col_class The base column class: ex: cols-4 will create 4 25% width columns in your "row" | |
* @param {integer} $min: 1 The number to begin iteration at | |
* @param {integer} $max: 6 The number to end iteration at | |
* @param {map} $breakpoints () A map consisting of the width breakpoint for keys and the column count for value | |
* @param {string} $full_breakout_width The screen dimensions where columns will have their "default" characteristics |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// adapted from | |
// https://css-tricks.com/full-browser-width-bars/ | |
@mixin full-width-pseudo($bg, $pos: relative) { | |
/* negative offset = section padding */ | |
margin: 0 -30px; | |
/* add back section padding value */ | |
padding: 0.25rem 30px; | |
position: 'absolute'; | |
background: $bg; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// in progress :) | |
/** | |
* Renders a boostrap dropdown that enables the user to select a "type" for a phone number | |
* @param {integer} options.id The ID of the phone number model | |
* @param {function} options.onClick What happens when you select a value | |
* @param {integer} options.value The value of an existing record (so we can pre-fill input) - uses the key defined in Phone model | |
*/ | |
export const BoostrapDropdown = ({ id, onClick, value, items, defaultLabel}) => { | |
const label = (value) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Returns a nice date, dude! | |
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleDateString | |
* @param {string} timestamp A timestamp waiting to be parsed | |
* @pram {object} options See the link provided above | |
* @param {String} locale locale string | |
* @return {string} A formatted timestamp | |
*/ | |
export const niceDate = (timestamp, options = {}, locale = "en-US") => { | |
const mergedOptions = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import PropTypes from 'prop-types'; | |
const hiddenImageStyle = { | |
width: 0, | |
height: 0 | |
}; | |
class LoadableImage extends React.Component { | |
constructor(props) { |
NewerOlder