A userstyle that makes you wait ten seconds before entering a Hacker News thread. I use stylus to manage mine.
.subtext {
display: inline-block;
background: linear-gradient(to left, transparent 50%, #f60 50%) right;| #!/bin/bash | |
| # | |
| # Backs up my entire website, in case Tumblr or CloudApp goes down someday. | |
| # Last time I ran this, it took 18 minutes. | |
| # | |
| wget \ | |
| --mirror `# turns on recursion and timestamping, basically says we want to "mirror" the whole site` \ | |
| --convert-links `# after download, convert all links to point to localhost` \ |
A userstyle that makes you wait ten seconds before entering a Hacker News thread. I use stylus to manage mine.
.subtext {
display: inline-block;
background: linear-gradient(to left, transparent 50%, #f60 50%) right;| ruby '2.7.1' | |
| gem 'rails', github: 'rails/rails' | |
| gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data | |
| # Action Text | |
| gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra' | |
| gem 'okra', github: 'basecamp/okra' | |
| # Drivers |
| require "active_record" | |
| ActiveRecord::Base.establish_connection('postgres:///testing') | |
| ActiveRecord::Migration.verbose = false | |
| ActiveRecord::Migration.class_eval do | |
| create_table :played_quizzes, force: true do |t| | |
| t.integer :player_ids, array: true | |
| t.json :quiz_snapshot | |
| end |
#Mac OS X
| gifify() { | |
| if [[ -n "$1" ]]; then | |
| if [[ $2 == '--good' ]]; then | |
| ffmpeg -i $1 -r 10 -vcodec png out-static-%05d.png | |
| time convert -verbose +dither -layers Optimize -resize 600x600\> out-static*.png GIF:- | gifsicle --colors 128 --delay=5 --loop --optimize=3 --multifile - > $1.gif | |
| rm out-static*.png | |
| else | |
| ffmpeg -i $1 -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > $1.gif | |
| fi | |
| else |
| sudo cp nginx /etc/init.d/ | |
| sudo update-rc.d nginx defaults | |
| sudo chmod +x /etc/init.d/nginx | |
| /etc/init.d/nginx start |
I'm planning on either writing this up in detail or maybe doing a screencast about screencasting, but I'll give a short version here.
On sound quality:
This matters a lot. In decreasing order of importance:
| ## Yacc is dead - Ruby edition (recognizer only) | |
| # Pretty much a direct port of the recognizer from: | |
| # http://matt.might.net/articles/parsing-with-derivatives/code/dparse.rkt | |
| # | |
| # Requires 1.9 | |
| # gem install lazy | |
| require 'lazy' | |
| include Lazy::Methods |
| require "application_responder" | |
| class ApplicationController < ActionController::Base | |
| # ... | |
| def self.acts_as_magical | |
| around_filter :magic_new, :only => :new | |
| around_filter :magic_show, :only => :show | |
| around_filter :magic_edit, :only => :edit |