$ rxmvvm "AddressList" "LightPass" "Leonardo Cardoso" "1aim.com" .
- $1 = Name of File
- $2 = Name of Project
- $3 = Name of Author
- $4 = Website
- $5 = Path
function updateversion() { | |
OLD="$1" | |
NEW="$2" | |
grep -rl "$OLD" . --exclude-dir={"Build","libs","Pods",".git"} --exclude={"Podfile.lock","CHANGELOG.md","update-version.sh"} | xargs sed -i.bak "s/$OLD/$NEW/g"; | |
find . -type f -name '*.bak' -delete | |
} |
#!/bin/bash | |
### Functions | |
trim() { | |
local trimmed="$1" | |
# Strip leading space. | |
trimmed="${trimmed## }" | |
# Strip trailing space. | |
trimmed="${trimmed%% }" |
for i in **/*.mp3; do afinfo "$i" |grep "bit rate" ; done |
for f in *; do | |
if [[ -d $f ]]; then | |
cd $f | |
for i in **/*.mp3; do ffmpeg -i "$i" -codec:a libmp3lame -b:a 192k "0-$i" ; done | |
cd ../ | |
else | |
for i in **/*.mp3; do ffmpeg -i "$i" -codec:a libmp3lame -b:a 192k "0-$i" ; done | |
fi | |
done |
import RealmSwift | |
import Realm | |
protocol CascadeDeleting: class { | |
func delete<Entity>(_ list: List<Entity>, cascading: Bool) | |
func delete<Entity>(_ results: Results<Entity>, cascading: Bool) | |
func delete<Entity: Object>(_ entity: Entity, cascading: Bool) | |
} |
Author: Chris Lattner
Modern Cocoa development involves a lot of asynchronous programming using closures and completion handlers, but these APIs are hard to use. This gets particularly problematic when many asynchronous operations are used, error handling is required, or control flow between asynchronous calls gets complicated. This proposal describes a language extension to make this a lot more natural and less error prone.
This paper introduces a first class Coroutine model to Swift. Functions can opt into to being async, allowing the programmer to compose complex logic involving asynchronous operations, leaving the compiler in charge of producing the necessary closures and state machines to implement that logic.
# GPG on Tower |
h1, | |
h2, | |
h3, | |
h4, | |
h5, | |
h6, | |
p, | |
blockquote { | |
margin: 0; | |
padding: 0; |