A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.
One-line version to paste in your DevTools
Use $$
if your browser aliases it:
~ 108 byte version
A tricky way to have responsive "read more"/accordion content.
A Pen by Isaac Rankin on CodePen.
This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.
The script is here:
#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"
Updated for Rails 4.0.0+
Set up the bower
gem.
Follow the Bower instructions and list your dependencies in your bower.json
, e.g.
// bower.json
{
<input type="file" name="fieldname"> | |
<input type="hidden" name="fieldname_filedir" value="1"> |
brew install ffmpeg | |
ffmpeg -start_number 079 -y -r 30 -i "DSC_0%03d.JPG" -vf scale=1920:-1,crop=1920:1080 -vcodec libx264 -b:v 10000k -r 30 outputhd.m4v | |
# Optional bits | |
# -start_number: the first number in the sequence (default: 0) | |
# -y: overwrite output files without asking | |
# -r: input framerate (i.e. photos per second. The second -r is the output framerate) | |
# -i: input files. %03d = 3 digits (so this example would use DSC_0079.JPG - DSC_0999.JPG) | |
# Picked 10000k for the bitrate based on https://support.google.com/youtube/answer/1722171?hl=en |
class PostsController < ActionController::Base | |
def create | |
Post.create(post_params) | |
end | |
def update | |
Post.find(params[:id]).update_attributes!(post_params) | |
end | |
private |