Skip to content

Instantly share code, notes, and snippets.

View dtothefp's full-sized avatar

David Fox-Powell dtothefp

  • Flexport
  • United States
View GitHub Profile
@dtothefp
dtothefp / isparta-loader-example.js
Created December 2, 2015 23:01
Isparta Loader for Webpack, Babel 6, and React
//webpack config
export default {
isparta: {
embedSource: true,
noAutoWrap: true,
babel: {
presets: ['es2015', 'stage-0', 'react']
}
},
module: {
@dtothefp
dtothefp / test.js
Last active December 2, 2015 18:30
//specific values for desktop and mobile
export default {
desktop: [ 'chrome', 'ie', 'safari'],
mobile: [ 'iphone', 'android' ]
};
//run all default desktop browsers
export default {
desktop: true
};
var includePaths = require('@hfa/pantsuit').includePaths;
gulp.src('**')
.pipe(sass({includePaths: includePaths}))
.pipe(gulp.dest('./dist'))
//scss
@import 'pantsuit';
@dtothefp
dtothefp / tools.md
Last active November 4, 2015 18:17

Ok added additional logging:

with iso tools using Promise in .server method rather than callback

bin/runner.js LOADING bin/runner.js => BRANCH dfp/update-environmentalization 
DEBUG: Wed, 04 Nov 2015 16:11:02 GMT bin/runner.js [lambda: init] 
DEBUG: Wed, 04 Nov 2015 16:11:02 GMT app/index.js LOADING app/index.js => BRANCH dfp/update-environmentalization 
DEBUG: Wed, 04 Nov 2015 16:11:02 GMT app/index.js Running Isomporphic Tools 
DEBUG: Wed, 04 Nov 2015 16:11:02 GMT app/index.js Running bootstrap#init 
DEBUG: Wed, 04 Nov 2015 16:11:02 GMT app/index.js Requiring lambda function: 1446653462914 
## Most importantly change your keybindings
# system preferences > keyboard >modifier keys => map caps lock to ctrl for all devices you use, i.e. laptop, external keypboard
# download Karabiner https://pqrs.org/osx/karabiner/
# go to "change the ctrl-l key > Ctrl-l to Ctrl-l > when you type Ctrl-l only, send escape" not jk BS to move out of insert mode
# go to "key repeat" tab and crank up your setting for super fast scrolling in vim
#### .tmux.conf
unbind C-b
set -g prefix C-Space
bind Space send-prefix
var $select = $('#id_donate_state');
var lastSelectVal = null;
$select.on('change', function(e) {
var val = e.target.value;
var isUnSelected = val === '' || _.isUndefined(val) || _.isNull(val);
if (isUnSelected) {
this.value = lastSelectedVal;
} else {
lastSelectedVal = val;
@dtothefp
dtothefp / SassMeister-input.scss
Created September 11, 2015 04:22
Generated by SassMeister.com.
// ----
// Sass (v3.3.14)
// Compass (v1.0.3)
// ----
//Properties are the css property, show value, hide value -- ex. opacity 1 0
@mixin optly--animate($properties, $transition, $enter: true, $leave: true) {
&.optly-hide {
display: none!important;
//example usage fade in and out
.modal-dialog-container {
$animprop: opacity 1 0;
$transition: all 0.2s linear;
width: 100%;
height: 100%;
cursor: pointer;
background: #fff;
position: absolute;
top: 0;
entry: {
vendor: [
'handlebars',
/*more common vendors to chunk*/
],
'bundle-with-hbs': './src/index.js',
'no-hbs': './src/a.js',
'with-hbs': './src/b.js'
},
output: .....,
export default {
entry: {
'bundle-with-hbs': './src/index.js',
'no-hbs': './src/a.js',
'with-hbs': './src/b.js'
},
output: {
filename: '[name].js',
path: `${__dirname}/dist`
},