This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Put this file at ~/Library/KeyBindings/DefaultKeyBinding.dict | |
// You may need to run: mkdir ~/Library/KeyBindings | |
{ | |
"~[" = (insertText:, "\U2018"); // Option-[ inserts left single quote | |
"~]" = (insertText:, "\U2019"); // Option-] inserts right single quote | |
"~{" = (insertText:, "\U201c"); // Option-Shift-[ inserts left double quote | |
"~}" = (insertText:, "\U201d"); // Option-Shift-] inserts right double quote | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Script loading is difficult thanks to IE. We need callbacks to fire | |
* immediately following the script's execution, with no other scripts | |
* running in between. If other scripts on the page are able to run | |
* between our script and its callback, bad things can happen, such as | |
* `jQuery.noConflict` not being called in time, resulting in plugins | |
* latching onto our version of jQuery, etc. | |
* | |
* For IE<10 we use a relatively well-documented 'preloading' strategy, | |
* which ensures that the script is ready to execute *before* appending |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import ReactDOM from 'react-dom'; | |
import Playground from 'component-playground'; | |
const examples = { | |
block: require('raw!./examples/block.example') | |
} | |
class Demo extends React.Component { | |
render() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<VictoryChart | |
interpolation="basis" | |
axisLabels={{x: "x axis", y: "y axis"}} | |
x={[ | |
[1, 2, 3, 4], | |
[-2, -1, 0, 1, 3], | |
[3, 4, 6] | |
]} | |
y={[ | |
[1, 2, 10, 4], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<VictoryChart | |
interpolation="basis" | |
axisLabels={{x: "x axis", y: "y axis"}} | |
x={[ | |
[1, 2, 3, 4], | |
[-2, -1, 0, 1, 3], | |
[3, 4, 6] | |
]} | |
y={[ | |
[1, 2, 10, 4], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_.chain | |
_.compact | |
_.difference | |
_.each | |
_.every | |
_.filter | |
_.findIndex | |
_.flatten | |
_.flattenDeep | |
_.includes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="en-US" itemscope itemtype="http://schema.org/WebPage"> | |
<head> | |
<script> | |
var t_page_start=new Date().getTime(); | |
var _boomr=_boomr||[]; | |
(function(d){var b=d.createElement('script');b.src='http://i2.walmartimages.com/js/rollups/rum.jsp';b.setAttribute('async','true');b.setAttribute('defer','defer');var s=d.getElementsByTagName('script')[0];s.parentNode.insertBefore(b, s);})(document); | |
</script> | |
<!-- Fix for iPad issue: item page isn't centered; large white right margin instead (OSO Site team, CASE00576055) --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from datetime import datetime | |
from dateutil.parser import parse | |
from dateutil.rrule import MO, TU, WE, TH, FR, SA, SU | |
from dateutil.rrule import rrule, rruleset, WEEKLY | |
rs = rruleset() | |
WEEKDAY_TIMES = [ | |
{ "byhour": 5, "byminute": 0 }, | |
{ "byhour": 5, "byminute": 15 }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* WebKit (possibly others; Firefox looks fine) does a bad job of scaling an | |
* SVG's aspect ratio such that its contents fill the extent of the space | |
* horizontally. If you're letting the browser determine the dimensions of your | |
* SVG, including the aspect ratio (e.g. by setting a percentage width and using | |
* `height: auto`), then you probably want to use `preserveAspectRatio="none"` | |
* in your SVG for the best results. But if you can't do that, you can at least | |
* bump up the SVG's height just enough for it to fill the `img` horizontally, | |
* letting the browser add the leftover padding to the top and bottom rather | |
* than the sides. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# | |
# Usage: python3 uber.py ~/Downloads/Takeout/Mail/Uber.mbox | |
# | |
# Dependencies: Python 3.4+ | |
# | |
# How to get the .mbox export: | |
# | |
# In Gmail, create a filter that applies the label "Uber" to emails matching: | |
# |