A ZSH theme optimized for people who use:
- Solarized
- Git
- Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)
For Mac users, I highly recommend iTerm 2 + Solarized Dark
| { | |
| "metadata": { | |
| "name": "", | |
| "signature": "sha256:c55e76093d1a673651f4bc980a841c775224b10a3019a066a7e03105de377bf5" | |
| }, | |
| "nbformat": 3, | |
| "nbformat_minor": 0, | |
| "worksheets": [ | |
| { | |
| "cells": [ |
| <body> | |
| <div id="svgarea"></div> | |
| <script src="http://d3js.org/d3.v3.min.js"></script> | |
| <style> | |
| text { | |
| font: bold 48px monospace; | |
| } |
| def FizzBuzz: | |
| for i in range(1,100): | |
| if not (i % 15): | |
| print "FizzBuzz" | |
| elif not (i % 3): | |
| print "Fizz" | |
| elif not (i % 5): | |
| print "Buzz" | |
| else: | |
| print i |
| from collections import defaultdict | |
| fruits = [("berry", "strawberry"), ("citrus", "orange"), \ | |
| ("citrus", "lemon"), ("stone fruit", "nectarine"), \ | |
| ("berry", "blue berry") ] | |
| # Suppose we want to build a dictionary using the first entry of each tuple as a key... | |
| fruit_dict = {} | |
| for tup in fruits: |
var moment = require('moment')
a = moment("2017-05-16")
b = moment("2017-05-17")
c = moment("2017-05-17")We should always use moment(a).isBefore(b) instead of a < b. Not because the latter does not
work (both forms work!); but rather, we might be tempted to assume something like a == b or a === b
behaves similarly.
| # Creates a index.js, {ComponentName}.jsx, styled/{ComponentName}.js at specified path | |
| # $1 - Path to create files at | |
| # $2 - Component name | |
| # Example usage: | |
| # crdir "src/components/shared" "Foo" | |
| # | |
| # src/components/shared | |
| # |-- index.js, Foo.jsx | |
| # --- styled/ | |
| # |--Foo.js |