Skip to content

Instantly share code, notes, and snippets.

@dustin-page
dustin-page / README.md
Created October 10, 2017 14:10 — forked from ngryman/README.md
intellij javascript live templates

intellij javascript live templates

Just a dump of handy live templates I use with IntelliJ. They should also work with WebStorm.

How to

  • Go to settings.
  • Search for live templates.
  • Under the javascript section you should be able to manage your templates.
@dustin-page
dustin-page / package.json
Created January 12, 2018 17:53 — forked from coryhouse/package.json
package.json for Building a JS Development Environment on Pluralsight
{
"name": "javascript-development-environment",
"version": "1.0.0",
"description": "JavaScript development environment Pluralsight course by Cory House",
"scripts": {
},
"author": "Cory House",
"license": "MIT",
"dependencies": {
"whatwg-fetch": "1.0.0"
@dustin-page
dustin-page / datepickerLocaldateDirective.js
Created April 10, 2018 21:13 — forked from SandeepThomas/datepickerLocaldateDirective.js
Dates only with Angular-UI Bootstrap datepicker - In Epoch time / Unix time
app.directive('datepickerLocaldate', ['$parse', function ($parse) {
var directive = {
restrict: 'A',
require: ['ngModel'],
link: link
};
return directive;
function link(scope, element, attr, ctrls) {
var ngModelController = ctrls[0];
@dustin-page
dustin-page / uib-datepicker-refresh.decorator.js
Last active April 12, 2018 21:23 — forked from cgmartin/datepicker.decorator.js
Send an event to refresh view of ui-bootstrap datepicker
/**
* Decorates the uib-datepicker directive's controller to allow
* refreshing the datepicker view (and rerunning invalid dates function)
* upon an event trigger: `$scope.$broadcast('refreshDatepickers');`
*
* Works with inline and popup. Include this after `ui.bootstrap.js`
*
* Dependencies:
* angular-ui-bootstrap v.1.3.3
*
/*
Title: uibdatepicker-emit-date decorator
Description: Decorator for the uib-datepicker that enables it to emit the last date selected by the user
Author: Dustin Page
Date: 05-31-2016
Dependencies:
- Angular 1.4+
- UI Bootstrap 1.3.2+
@dustin-page
dustin-page / on-jsx.markdown
Created April 25, 2018 14:22 — forked from chantastic/on-jsx.markdown
JSX, a year in

Hi Nicholas,

I saw you tweet about JSX yesterday. It seemed like the discussion devolved pretty quickly but I wanted to share our experience over the last year. I understand your concerns. I've made similar remarks about JSX. When we started using it Planning Center, I led the charge to write React without it. I don't imagine I'd have much to say that you haven't considered but, if it's helpful, here's a pattern that changed my opinion:

The idea that "React is the V in MVC" is disingenuous. It's a good pitch but, for many of us, it feels like in invitation to repeat our history of coupled views. In practice, React is the V and the C. Dan Abramov describes the division as Smart and Dumb Components. At our office, we call them stateless and container components (view-controllers if we're Flux). The idea is pretty simple: components can't

@dustin-page
dustin-page / README-Template.md
Created June 29, 2018 19:49 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@dustin-page
dustin-page / .gitconfig
Created March 11, 2019 19:49
Git - Configuring External Merge and Diff Tool - Copy the following code into the current .gitconfig file
[merge]
tool = p4merge
[mergetool "p4merge"]
cmd = 'C:/Program Files/Perforce/p4merge.exe' \"$BASE\" \"$LOCAL\" \"$REMOTE\" \"$MERGED\"
[diff]
tool = p4merge
[difftool "p4merge"]
cmd = 'C:/Program Files/Perforce/p4merge.exe' \"$LOCAL\" \"$REMOTE\"