Or: “Everybody likes being given a glass of water.”
By Merlin Mann.
It's only advice for you because it had to be advice for me.
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.
brew install ffmpeg
apt install ffmpeg
# Given a list of items in the 'entries' array, it'll spin through | |
# some random ones before settling on a "winner" which flashes. | |
# Yes, the code is terrible, I threw it together on the fly for a Twitter giveaway! | |
# See https://twitter.com/peterc/status/955955015126003712 for example | |
# Only dependency is curses, via "gem install curses" | |
require 'curses' |
Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)
First one found from of
* { | |
font-size: 12pt; | |
font-family: monospace; | |
font-weight: normal; | |
font-style: normal; | |
text-decoration: none; | |
color: black; | |
cursor: default; | |
} |
DKIM is DomainKeys Identified Mail and is used in mail servers, such as Postfix or Sendmail to sign e-mails and thus authenticating the sender so that a forgery can be detected. It also reduces the possibility of an e-mail being flagged as spam, but it's not a definite prevention. | |
A much simpler method is using SPF (Sender Policy Framework) which, in a nutshell, verifies the sender IP address. | |
According to the internet, using both should result to ????, PROFIT !!!. | |
SPF does not need a specific configuration. Whitelisted servers are listed in a DNS record, TXT or SPF, and an example record is: | |
example.com. IN TXT "v=spf1 a mx ~all" |
belongs_to
association does not automatically save the object. It does not save the associated object either.has_one
association, that object is automatically saved (in order to update its foreign key).has_one
association) is unsaved (that is, new_record?
returns true) then the child objects are not saved. They will automatically when the parent object is saved.#!/usr/bin/env ruby -wKU | |
# Comments added 6 March 2014. | |
# Implementation of the MetaWeblog API for my personal Ruby static blog generator. | |
# This is not even nearly idiomatic Ruby. There are all kinds of issues. | |
# (What's with the method interiors all being mushed-up together?) | |
# But -- it's also worked flawlessly for five years without my having to edit it. | |
# It won't work for anyone else as-is — but if it helps anyone | |
# to do a MetaWeblog API implementation, then cool. |