- Using emmet in jsx files
- Emmet expands text when js autocomplete needed
- Using
className
instead ofclass
- Install plugin RegReplace
- Install plugin Chain Of Command
;; Define a "base type" of Dog | |
(defrecord Dog [breed]) | |
;; Define a "sub type" of TrainedDog | |
(defrecord TrainedDog [dog word]) | |
;; The interface that both Dog and TrainedDog will implement | |
(defprotocol Talker | |
(bark [_]) | |
(speak [_]) |
diff --git a/client/app/bundles/app/startup/ClientApp.jsx b/client/app/bundles/app/startup/ClientApp.jsx | |
index f8cb40c..0d0cc1e 100644 | |
--- a/client/app/bundles/app/startup/ClientApp.jsx | |
+++ b/client/app/bundles/app/startup/ClientApp.jsx | |
@@ -1,6 +1,6 @@ | |
import React from 'react'; | |
import ReactDOM from 'react-dom'; | |
-import Router from 'react-router'; | |
+import {Router} from 'react-router'; | |
import { browserHistory, hashHistory } from 'react-router'; |
// === Arrays | |
var [a, b] = [1, 2]; | |
console.log(a, b); | |
//=> 1 2 | |
// Use from functions, only select from pattern | |
var foo = () => { | |
return [1, 2, 3]; |
clamps": [ | |
{ | |
"type": "acl", | |
"ts": 1421571216000 | |
}, | |
{ | |
"type": "fail", | |
"ts": 1421589087000 | |
}, | |
{ |
var RTCPeerConnection = null; | |
var getUserMedia = null; | |
var attachMediaStream = null; | |
var reattachMediaStream = null; | |
var webrtcDetectedBrowser = null; | |
var webrtcDetectedVersion = null; | |
function trace(text) { | |
if (text[text.length - 1] === "\n") { | |
text = text.substring(0, text.length - 1); |
Welcome!
For feedback or suggestions, please send a tweet (@dideler). Gist comments don't notify me. Pull requests aren't possible with gists (yet), so I don't recommend forking because then I can't easily get the change.
Starring this gist will give me an idea of how many people consider this list useful.
'use strict'; | |
var _ = require('lodash'), | |
moment = require('moment'), | |
Promise = require("bluebird"); | |
module.exports = function (clamps) { | |
let start = +new Date(), | |
dayms = 1000 * 60 * 60 * 24; |
import { Component } from "React"; | |
export var Enhance = ComposedComponent => class extends Component { | |
constructor() { | |
this.state = { data: null }; | |
} | |
componentDidMount() { | |
this.setState({ data: 'Hello' }); | |
} | |
render() { |