echo `ifconfig $(netstat -nr | grep -e default -e "^0\.0\.0\.0" | head -1 | awk '{print $NF}') | grep -e "inet " | sed -e 's/.*inet //' -e 's/ .*//' -e 's/.*\://'`$ uname -r
| # BASH/ZSH ALIASES FOR THE LAZY DEVELOPER | |
| ## Git Workflow Aliases | |
| ### Push current branch to origin | |
| alias push='git push origin $(git rev-parse --abbrev-ref HEAD)' | |
| ### Pull current branch with submodules | |
| alias pull='git pull --recurse-submodules origin $(git rev-parse --abbrev-ref HEAD)' | |
| ### Show git status in short format | |
| alias s="git status -s" | |
| ### Commit with message (usage: c "commit message") |
| import {Component} from 'angular2/core'; | |
| import Modal from './modal'; | |
| @Component({ | |
| selector: 'ngc-app', | |
| template: ` | |
| <div class="p3"> | |
| <p class="p4"> | |
| <button class="btn btn-primary block col-6 mx-auto" | |
| (click)="showModal()"> |
| /* | |
| Exemples : | |
| <a href="posts/2" data-method="delete" data-token="{{csrf_token()}}"> | |
| - Or, request confirmation in the process - | |
| <a href="posts/2" data-method="delete" data-token="{{csrf_token()}}" data-confirm="Are you sure?"> | |
| */ | |
| (function() { | |
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
| /** | |
| * Simple debounce function; usage: | |
| * | |
| * Create a function that only can be called once every 500 ms | |
| * | |
| * var df = debounce(function() { | |
| * ... func body ... | |
| * }, 500) | |
| * | |
| * Bind the function to an event |
| /* | |
| Small ng-admin config showing how to inject a Login controller when | |
| a 401 error is returned by the server. | |
| */ | |
| (function () { | |
| "use strict"; | |
| var app = angular.module('myApp', [ |
| var app = angular.module('admin', ['ng-admin']), | |
| hook = new Hook.Client({...}); | |
| var headerNav, pageWrapper, restangular; | |
| if (hook.auth.currentUser && hook.auth.currentUser.role != 'admin') { | |
| hook.auth.logout(); | |
| } | |
| function hideMenu() { |
