Skip to content

Instantly share code, notes, and snippets.

@karltaylor
karltaylor / UIBorderedLabel.swift
Created December 1, 2016 14:46 — forked from karloscarweber/UIBorderedLabel.swift
UILabel subclass that makes setting padding really easy.
//
// UIBorderedLabel.swift
// standToMake
//
// Created by Karl Oscar Weber on 9/13/14.
// Copyright (c) 2014 Karl Oscar Weber. All rights reserved.
//
// Thanks to: http://userflex.wordpress.com/2012/04/05/uilabel-custom-insets/
import UIKit
@karltaylor
karltaylor / convertImg.sh
Created August 12, 2016 16:52
Convert image to different format.
for i in *.png; do convert -verbose $i ${i%%.png}.jpg; done && open .
@karltaylor
karltaylor / resizeImg.sh
Created August 9, 2016 11:42
Bash script to resize multiple images at once.
for i in *.jpg; do convert $i -resize 1472x983 $i; done
@karltaylor
karltaylor / ffmpeg-resize-convert-compress-all.sh
Last active June 19, 2018 20:26
Bash script to scale, convert and compress videos within a directory to .webm
for file in *.mp4; do ffmpeg -i "$file" -filter:v scale=1080:-1 -acodec libvorbis -ac 2 -b:v 5000k "${file%.mp4}".webm; done