From Ember restaurant in Arroyo Grande, CA
- 2oz empress 1908 gin
- ¾oz fresh lemon juice
- ⅜oz lavender syrup
- ⅜oz elderflower liqueur (Fiorente or St Germain)
Shake and serve on ice in a Collins glass. Garnish: garden lavender sprig
From Ember restaurant in Arroyo Grande, CA
Shake and serve on ice in a Collins glass. Garnish: garden lavender sprig
Script to parse Disqus Comment Export XML as documented at
https://help.disqus.com/en/articles/1717164-comments-export
and translate it into a JSON format that is easier to handle (for example, using Jekyll's built-in support for JSON files in _data
).
The imagined use case is if you have decided to remove Disqus comments from your blog (or maybe disable commenting entirely), but have existing comments on previous posts that you want to keep. You can export your comments from Disqus, and statically render the historical comments, without needing any Disqus Javascript or cookies.
The Disqus XML exports all categories, threads and posts into flat lists, with id references for parent relationships. That makes it complicated to do things like "look up all comments on this blog post", or see which comments were in reply to which,
import logging | |
logging.basicConfig() | |
logging.getLogger('sqlalchemy.engine').setLevel(logging.INFO) |
I hereby claim:
To claim this, I am signing this object:
#!/bin/bash -e | |
if [[ $# > 0 ]]; then | |
case "$1" in | |
-h | -\? | --help ) | |
{ | |
echo "Add a todo:" | |
echo " todo Reformulate the widget plans." | |
echo "See what you have to do:" | |
echo " todo" |
sstokes@sstokes-mba-ubuntu:gittest$ git log --all --decorate --graph --oneline | |
* 15e2132 (refs/stash) WIP on master: 2e83ed8 initial commit | |
|\ | |
| * 61442a1 index on master: 2e83ed8 initial commit | |
|/ | |
* 2e83ed8 (HEAD, master) initial commit |
# This is a large amount of Ruby code | |
# No, really, it is | |
# Can't you tell? | |
def foo(bar) | |
baz(bar) | |
end | |
# That was a large amount of Ruby code | |
# Wiffle bamble boo |
EM.run do | |
fetch('http://google.com/search?q=deferrable_gratification').bind! do |doc| | |
fetch((doc / 'ol' / 'li' / 'a')[0][:href]) | |
end.bind! do |doc| | |
fetch((doc / '#repository_homepage').at(:a)[:href]) | |
end.callback do |doc| | |
puts doc.at(:title).inner_text | |
# now the previous 'doc's aren't in scope, so I can't accidentally | |
# refer to them | |
end.errback do |error| |
# Hmmm | |
DG::loop_until { url.present? && chunks_done < 25 }.body do | |
make_http_request(stuff, things, other_things).safe_callback do |blah| | |
blah | |
end | |
end.transform | |
# Yum | |
DG::loop_until(lambda { url.present? && chunks_done < 25 }) do | |
make_http_request(stuff, things, other_things).safe_callback do |blah| |