Skip to content

Instantly share code, notes, and snippets.

@joshkehn
joshkehn / f.py
Created September 6, 2022 23:24
Converting Amazon item CSV to Alfred JSON
"""
Total pile of general hacks to take a CSV from stdin and turn it into some
Alfred compatible JSON.
Copyright 2022-present Joshua Kehn
License: MIT
Don't @ me with problems.
Field orders (if you were curious to expand):
@joshkehn
joshkehn / queue.py
Last active September 6, 2017 00:27
# (c) 2017 Joshua Kehn, all rights reserved.
class Node(object):
def __init__(self, val=None):
self.val = val
self.next = None
class QueueException(Exception):
pass
@joshkehn
joshkehn / dataisbeautiful.csv
Last active February 29, 2020 21:40
Posts from /r/dataisbeautiful as of 2017-09-03
We can't make this file beautiful and searchable because it's too large.
"created","post","score","comments","oc","author","title"
"2017-09-03T20:38:25","6xwz6r","1","0","TRUE","WhosaWhatsa","2017 YTD U.S. Feature Film Release with Most IMDB Votes [OC]"
"2017-09-03T19:58:32","6xwrh3","4","4","TRUE","_HexMan","Police Shootings since January 1, 2015 [OC]"
"2017-09-03T18:44:34","6xwdcp","1","1","TRUE","potato_pototo","Average Indian movie length by language[OC]"
"2017-09-03T18:37:12","6xwbxp","3","2","TRUE","seis-matters","Recordings of Five North Korea Nuclear Tests [OC]"
"2017-09-03T18:22:33","6xw8z7","5","1","FALSE","pecanpiecat","The worth of $100 by state"
"2017-09-03T17:43:34","6xw0t5","2","1","TRUE","wisequokka","Time series seismic data of the North Korean H-bomb test [OC]"
"2017-09-03T17:30:03","6xvxyi","0","0","FALSE","thevizinista","Floral Designer"
"2017-09-03T15:41:26","6xva9b","1","2","TRUE","Living_Granger","Capital punishment since 1991: Number of executioners and abolitionist countries. [OC]"
"2017-09-03T15:17:27","6xv56f","0","0","FALSE","d0mth0ma5","North Korean tr
say "Talking with images is boring"
<pre id="forcelog">Waiting for force touch...</pre>
<div id="forceclick">&#x261e;</div>
<style type="text/css">
#forcelog { font-family: "Source Code Pro", Consolas, Monaco, "Andale Mono", "Lucida Sans Typewriter", Courier, "Courier New", monospace; }
#forceclick { display: block; width: 50%; padding: 10px; margin: 1em auto; background: gray; color: white; text-align: center; font-size: 3em; line-height: 3em; }
#forceclick[mouse-down] { background: red; }
#forceclick[force-down] { background: green; }
</style>
<script type="text/javascript" src="//code.jquery.com/jquery-2.1.4.min.js"></script>
<script type="text/javascript">
```
big code block
```
```
big code block
```

Ingredients

  • 1-2 onions diced
  • Garlic (as much as you'd like)
  • Fresh tomatoes (quartered, remove skins if you like)
  • Diced tomatoes (canned)
  • Tomato paste (one tube / small can)
  • Fresh basil

Steps

## Ingredients
- 1-2 onions diced
- Garlic (as much as you'd like)
- Fresh tomatoes (quartered, remove skins if you like)
- Diced tomatoes (canned)
- Tomato paste (one tube / small can)
- Fresh basil
## Steps
@joshkehn
joshkehn / preload-example.css
Created February 11, 2014 19:11
CSS background image preloading without JavaScript. Includes LESS mixin.
.arrow {
background: url("../images/arrow-normal.svg") no-repeat top center;
}
.arrow:before {
background: url("../images/arrow-hover.svg");
display: none;
}
.arrow:hover {
background: url("../images/arrow-hover.svg");
}