Skip to content

Instantly share code, notes, and snippets.

@charlesvestal
charlesvestal / index.slim
Created January 31, 2020 19:48
Masonry with Flexbox + JS
.masonry-with-columns#masonry-with-columns
- for i in (1..15)
div #{i}
@charlesvestal
charlesvestal / forsale.md
Created November 11, 2015 18:32 — forked from andymcmillan/forsale.md
For Sale

For Sale

I’m currently clearing out my apartment, and am selling off a few things I no longer need. If you’re interested in anything listed below, please email me and we’ll arrange pickup / delivery.

Bike

I had a beautiful single-speed bicycle built by Mission Bicycle in August of 2012. Then I never once rode it, because I am an idiot. Check out the specification, or email me if you’re interested in giving it a good home.

Tech

@charlesvestal
charlesvestal / The Atlantic
Created May 14, 2015 19:28
Facebook Instant Articles
{
"672858856170909": {
"id": "672858856170909",
"latest_version": {
"id": "994845887216565",
"article_canonical_url": "http:\/\/www.theatlantic.com\/magazine\/archive\/2015\/06\/the-execution-of-clayton-lockett\/392069\/",
"article_version_number": 78,
"cover_media": {
"__type__": {
"name": "DocumentVideoElement"
1 - download the latest video-transcode from https://github.com/donmelton/video-transcoding-scripts/archive/master.zip
2 - download cygwin for your appropriate platform at from https://cygwin.com/install.html
3 - download windows version of handbrake cli from https://handbrake.fr/downloads2.php
4 - download mkvtoolnix from https://www.bunkus.org/videotools/mkvtoolnix/downloads.html
5 - download mplayer from http://mplayerwin.sourceforge.net/downloads.html (download the 7z not the installer)
6 - download the latest 'static' ffmpeg from http://ffmpeg.zeranoe.com/builds/
7 - download mp4v2 from https://code.google.com/p/mp4v2/downloads/detail?name=mp4v2-r479-windows-binaries.zip&can=2&q=
install cygwin, just click next and use the default options
# script to retrieve and calculate total up and down votes for an image and its comments.
# download the json by appending .json to the imgur gallery URL, i.e. http://imgur.com/gallery/SQRELN4 becomes #http://imgur.com/gallery/SQRELN4.json
# using local files because imgur returns different data for non-browsers.
import urllib2
import json
f = open("fIWYSVs.json","rb") #replace with actual image's json
#TODO: retrieve json directly with user-agent spoof
#TODO: prompt for image URL