Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| const radians = deg => deg * Math.PI / 180 | |
| // @param {Number} z Offset from radius | |
| export default function convertLatLngToSphere (lat, lng, baseRadius, z) { | |
| // radians | |
| const phi = radians(lat) | |
| const theta = radians(lng - 180) | |
| const radius = baseRadius + z | |
Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)That's it!
| #!/bin/bash | |
| #k8setup script v1.2019.4.11 | |
| #RHEL or CentOS 7.4+ | |
| #Direct any questions to [email protected] | |
| #01101000 01110100 01110100 01110000 01110011 00111010 00101111 00101111 01101100 01100001 01101110 01100100 01101111 01101110 01101011 01100101 01111001 00101110 01100011 01101111 01101101 00101111 | |
| # Watch how it is used on youtube: https://youtu.be/KWehrWGjkm4 | |
| # | 
| #!/usr/local/bin/python3 | |
| # one-off scraper for egghead.io videos in a series | |
| # usage: chmod +x grabber.py && ./grabber.py <series stub> | |
| # requires youtube-dl (`brew install youtube-dl`) | |
| import os | |
| import subprocess | |
| import json | |
| import argparse | |
| from urllib.request import urlretrieve | 
| import React, { Component } from 'react' | |
| class Blink extends Component { | |
| constructor () { | |
| super() | |
| this.state = { visible: true } | |
| this.blink = this.blink.bind(this) | |
| this.interval = null | |
| } | |
| blink () { | 
| import React from 'react'; | |
| import MaterialUiForm from './MaterialUiForm'; | |
| import { createStore } from 'redux'; | |
| import { Provider } from 'react-redux'; | |
| import reducer from './reducer'; | |
| import getMuiTheme from 'material-ui/styles/getMuiTheme'; | |
| import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider'; | |
| const store = createStore(reducer); | 
I recently switched over to neovim (see my screenshots at the bottom). Below is my updated config file.
It's currently synchronized with my .vimrc config except for a block of neovim-specific terminal key mappings.
This is still a work in progress (everyone's own config is always a labor of love), but I'm already extremely pleased with how well this is working for me with neovim. While terminal mode isn't enough to make me stop using tmux, it is quite good and I like having it since it simplifies my documentation workflow for yanking terminal output to paste in a markdown buffer.
These days I primarily develop in Go. I'm super thrilled and grateful for fatih/vim-go,