Skip to content

Instantly share code, notes, and snippets.

"use strict";
import React, {Component} from 'react';
import calcContentHeight from './dom-textarea-measure';
class AutogrowingTextarea extends Component {
constructor(props) {
this.props = props;
this.state = {};
this.textareaProps = sanitizeChildProps(props);
library cookie;
import 'dart:html';
/*
* dart document.cookie lib
*
* ported from
* http://www.quirksmode.org/js/cookies.html
*
@nikgraf
nikgraf / backbone view
Created October 12, 2012 20:00 — forked from fnordo/gist:3865266
Example BackboneView for pjax like architecture
ArstistPageView = Backbone.View.extend({
initialize: function(){
// If model has changed, update view accordingly:
this.model.bind("all", this.render, this);
},
render: function() {
// fetch the new rendered template from server
templateRequest = $.ajax({ url: "path/to/rendered/artist/template" })
templateRequest.done(function(data) {
// render the template into dom
@nikgraf
nikgraf / npm-graph
Created June 17, 2011 14:47 — forked from michael/npm-graph
data.js playground
Data = require('data')
schema =
'/type/project':
'type': 'type'
'name': 'Project'
'properties':
'name':
'name': 'Name', 'unique': true, 'type': 'string', 'required': true
'tags':