(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| import Foundation | |
| var l = [ | |
| "abesi", | |
| "hidebu", | |
| "tawaba", | |
| ] | |
| var m = [ | |
| "abesi": 1, |
| ## Rename file | |
| j=1;for i in `ls`; do prt=$(printf '%04d' $j);j=$((j + 1));echo "mv $i $prt.JPG"; mv $i "$prt.JPG"; done | |
| ## crop | |
| mogrify -crop 1920x1080+362+628 *.jpg | |
| ## or resize | |
| mogrify resize 1920x1080 *.jpg | |
| ## morph if necessary !!! takes time | |
| convert *.jpg -delay 10 -morph 10 %05d.morph.jpg | |
| ## create movie | |
| ffmpeg -r 25 -i %05d.morph.jpg output.mp4 |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| // | |
| // CollectionViewDataSource.swift | |
| // Khan Academy | |
| // | |
| // Created by Andy Matuschak on 10/14/14. | |
| // Copyright (c) 2014 Khan Academy. All rights reserved. | |
| // | |
| import UIKit |
| #!/bin/bash | |
| # by Andy Maloney | |
| # http://asmaloney.com/2013/07/howto/packaging-a-mac-os-x-application-using-a-dmg/ | |
| # make sure we are in the correct dir when we double-click a .command file | |
| dir=${0%/*} | |
| if [ -d "$dir" ]; then | |
| cd "$dir" | |
| fi |
| // | |
| // BitwiseOptions.swift | |
| // | |
| // Created by Gregory Higley on 11/24/14. | |
| // Copyright (c) 2014 Prosumma LLC. All rights reserved. | |
| // | |
| // Permission is hereby granted, free of charge, to any person obtaining a copy | |
| // of this software and associated documentation files (the "Software"), to deal | |
| // in the Software without restriction, including without limitation the rights | |
| // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| struct Regex { | |
| let pattern: String | |
| let options: NSRegularExpressionOptions! | |
| private var matcher: NSRegularExpression { | |
| return NSRegularExpression(pattern: self.pattern, options: self.options, error: nil) | |
| } | |
| init(pattern: String, options: NSRegularExpressionOptions = nil) { | |
| self.pattern = pattern |
| #!/usr/bin/env xcrun swift -O | |
| struct MyOptions: RawOptionSetType, BooleanType { | |
| var boolValue: Bool { return self.rawValue != 0 } | |
| var rawValue: UInt | |
| init(rawValue value: UInt) { | |
| self.rawValue = value | |
| } | |
| init(nilLiteral: Void) { |
| /// Observes a run loop to detect any stalling or blocking that occurs. | |
| /// | |
| /// This class is thread-safe. | |
| @interface GHRunLoopWatchdog : NSObject | |
| /// Initializes the receiver to watch the specified run loop, using a default | |
| /// stalling threshold. | |
| - (id)initWithRunLoop:(CFRunLoopRef)runLoop; | |
| /// Initializes the receiver to detect when the specified run loop blocks for |
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| # Localize.py - Incremental localization on XCode projects | |
| # João Moreno 2009 | |
| # http://joaomoreno.com/ | |
| # Modified by Steve Streeting 2010 http://www.stevestreeting.com | |
| # Changes | |
| # - Use .strings files encoded as UTF-8 |