Instantly share code, notes, and snippets.

View BenchmarkIcon.js
import React from 'react';
import '../../../assets/icons.svg';
import './icons.css';
const defaultDimensions = '32';
const Icon = props => (
<svg
width={props.width || defaultDimensions}
height={props.height || defaultDimensions}
View dropdown.tsx
import * as React from 'react';
import { css, StyleSheet } from 'aphrodite';
export class Dropdown extends React.Component<any, any> {
constructor(props) {
super(props);
this.state = {
isOpen: false,
selectedOption: {}
};
View dropdown.tsx
import * as React from 'react';
import { css, StyleSheet } from 'aphrodite';
export class Dropdown extends React.Component<any, any> {
constructor(props) {
super(props);
this.state = {
isOpen: false,
selectedOption: {}
};
View update.yml
before_deploy:
#...
- gcloud --quiet components update beta #this
- gcloud —-quiet components beta update #instead of this
#...
View gist:10553508
// Ionic Starter App
// angular.module is a global place for creating, registering and retrieving Angular modules
// 'starter' is the name of this angular module example (also set in a <body> attribute in index.html)
// the 2nd parameter is an array of 'requires'
angular.module('starter', ['ionic'])
.run(function($ionicPlatform) {
$ionicPlatform.ready(function() {
if(window.StatusBar) {
View gist:10553365
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
<title></title>
<link href="lib/ionic/css/ionic.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
View gist:8946571
(function(){
var Geolocation = {
coordinates: {long:null, lat:null, timestamp:null, accuracy:null},
capable: function(){
//return false;
return Modernizr.geolocation?true:false;
},
View gist:8941657
function Car() {
this.speed = 0
}
Car.prototype.accelerate = function(by) {
var self = this;
function throttler() {
if (by > 20) {
View gist:5719719
<div class="row">
<div class="span4"></div>
<div class="span4"></div>
<div class="span4"></div>
</div>
View gist:4734881
underscore.each(latestFiles, function (file, i) {
var currentFile = file.split('/').pop();
fs.readFile(file, 'utf8', function (error, content) {
if (error) {
return cb(error, null);
}
parser.parseString(content, function (error, json) {
if (error) {