Skip to content

Instantly share code, notes, and snippets.

@millerdrew
millerdrew / settings.json
Last active January 7, 2019 13:33
VSCode Settings
{
"window.zoomLevel": 0,
"workbench.colorTheme": "Night Owl",
"editor.fontFamily": "Fira Code",
"editor.fontLigatures": true,
// Set the default
// "editor.formatOnSave": true,
"workbench.iconTheme": "vscode-icons",
"gitlens.advanced.messages": {
"suppressCommitNotFoundWarning": true,
@millerdrew
millerdrew / keybindings.json
Last active January 7, 2019 13:35
My Keyboard Shortcuts in VSCode
// Place your key bindings in this file to overwrite the defaults
[
// open file from File Explorer
{
"key": "enter",
"command": "list.select",
"when": "explorerViewletVisible && filesExplorerFocus"
},
{
"key": "enter",
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="[add your bin description]">
<script src="https://unpkg.com/expect@%3C21/umd/expect.min.js"></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
@millerdrew
millerdrew / index.html
Created September 28, 2018 06:28
Material Lite/Typescript Todo
<div class="container">
<h1>Todo App</h1>
<div id="todo-list">
</div>
<input type="text" id="new-todo" placeholder="New todo Item"></input>
<button id="add-todo" class="add-todo mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--accent" onclick="addTodo()">Add Todo</button>
</div>
// The Cloud Functions for Firebase SDK to create Cloud Functions and setup triggers.
const functions = require('firebase-functions');
// The Firebase Admin SDK to access the Firebase Realtime Database.
const admin = require('firebase-admin');
admin.initializeApp();
// Take the text parameter passed to this HTTP endpoint and insert it into the
// Realtime Database under the path /messages/:pushId/original
exports.addVocab = functions.https.onRequest((req, res) => {
#For Japanese Studies
#Get Japanese definition from jisho.org. Uses a ruby script, jishourl, to build the url and
#make sure it's encoded properly. After that curl pulls down the data and pipes it into
#nokogiri for parsing.
function jdef() {
curl -s "$(jishourl $1)" | nokogiri -e 'puts $_.at_css("span.meaning-meaning").text'
}
#Adds a new word and definition to the Firebase Realtime Database via a cloud function
alias nw='function _nw() {
#!/usr/bin/env ruby
puts URI.escape("https://jisho.org/search/" + ARGV.first)
@millerdrew
millerdrew / index.html
Created March 1, 2017 18:01
JS Bin ES6 Exercise: rest/spread // source https://jsbin.com/lalalahevi
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="ES6 Exercise: rest/spread">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<h1>Test Results</h1>
set nocompatible " Disable vi-compatibility
set t_Co=256
colorscheme xoria256
set guifont=menlo\ for\ powerline:h16
set guioptions-=T " Removes top toolbar
set guioptions-=r " Removes right hand scroll bar
set go-=L " Removes left hand scroll bar
set linespace=15
set nocompatible " Disable vi-compatibility
set t_Co=256
colorscheme xoria256
set guifont=menlo\ for\ powerline:h16
set guioptions-=T " Removes top toolbar
set guioptions-=r " Removes right hand scroll bar
set go-=L " Removes left hand scroll bar
set linespace=15
set showmode " always show what mode we're currently editing in