Skip to content

Instantly share code, notes, and snippets.

View emilyst's full-sized avatar

Emily Strickland emilyst

View GitHub Profile

gif-from-tweet

There are so many great GIFs out there and I want to have copies of them. Twitter makes that harder than it should be by converting them to MP4 and not providing access to the source material. To make it easier, I made a bash pipeline that takes a tweet URL and a filename, extracts the MP4 from that tweet and uses ffmpeg to convert back to GIF.

Dependencies

  • ffmpeg
    • macOS: brew install ffmpeg
    • Ubuntu/Debian: apt install ffmpeg
#!/bin/bash
set -e
CONTENTS=$(tesseract -c language_model_penalty_non_dict_word=0.8 --tessdata-dir /usr/local/share/tessdata/ "$1" stdout -l eng | xml esc)
hex=$((cat <<EOF
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
@hynkle
hynkle / Readme.md
Last active December 11, 2015 22:09
Rails constant buffoonery

Given an otherwise empty Rails app with the following two models:

# app/models/cities/massachusetts/boston.rb

class Cities::Massachusetts::Boston

  def self.refer_to_denver
    begin
      Colorado::Denver
@erikh
erikh / hack.sh
Created March 31, 2012 07:02 — forked from DAddYE/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@nikography
nikography / alfred-extensions.md
Last active December 28, 2016 13:53
alfred extensions compilation
@nikography
nikography / markdown-info.markdown
Created August 15, 2011 11:20
markdown compilation

markdown reference

footnotes:

works in tumblr with markdown editor enabled
requires multimarkdown

input:
sentence with footnote[^1].