Step 0: Open Automator, New Service.
Step 1: Drag out Run Shell Script action. Pass Input to STDIN
Step 2: This code:
open `gist`
| # Using Python | |
| import os, zipfile | |
| z = zipfile.ZipFile('/databricks/driver/D-Dfiles.zip') | |
| for f in z.namelist(): | |
| if f.endswith('/'): | |
| os.makedirs(f) | |
| # Reading zipped folder data in Pyspark |
| // Restify Server CheatSheet. | |
| // See: http://journal.gentlenode.com/node-3-restify-cheatsheet/ | |
| // More about the API: http://mcavage.me/node-restify/#server-api | |
| // Install restify with npm install restify | |
| // 1.1. Creating a Server. | |
| // http://mcavage.me/node-restify/#Creating-a-Server | |
using mocha/chai/sinon for node.js unit-tests? check out my utility: mocha-stirrer to easily reuse test components and mock require dependencies
| import React, { PropTypes } from 'react'; | |
| @reactor | |
| class Child extends React.Component { | |
| componentDidMount() { | |
| console.log('Child mounted with context reactor:', this.context.reactor); | |
| } | |
| render() { | |
| return <span>Child Component</span>; | |
| } |
From: StackOverflow
document.getElementById("MyElement").className = "MyClass";
document.getElementById("MyElement").className += " MyClass";