Install ffmpeg
brew install ffmpeg
Download file through url, like this:
ffmpeg -protocol_whitelist file,http,https,tcp,tls,crypto -i "http://url-file.domain.m3u8" -c copy video.mp4
| // | |
| // CarouselView.swift | |
| // | |
| // Created by xtabbas on 5/7/20. | |
| // Copyright © 2020 xtadevs. All rights reserved. | |
| // Original source available at | |
| // https://gist.github.com/xtabbas/97b44b854e1315384b7d1d5ccce20623 | |
| // | |
| // Modified by Diogo Silva on 30/03/21 | |
| // Modified source available at |
| /** | |
| Make a type `Identifiable` based on its `Hashable` hash value. | |
| This can be useful when all the properties are required to represent its identifier. | |
| ``` | |
| struct Item: Hashable, IdentifiableByHashable { | |
| let title: String | |
| var message: String? | |
| } |
Install ffmpeg
brew install ffmpeg
Download file through url, like this:
ffmpeg -protocol_whitelist file,http,https,tcp,tls,crypto -i "http://url-file.domain.m3u8" -c copy video.mp4
| import Foundation | |
| extension UIView { | |
| func height(constant: CGFloat) { | |
| setConstraint(value: constant, attribute: .height) | |
| } | |
| func width(constant: CGFloat) { | |
| setConstraint(value: constant, attribute: .width) | |
| } |
| call plug#begin() | |
| Plug 'ArunSahadeo/Webval' | |
| Plug 'Valloric/YouCompleteMe' | |
| Plug 'Xuyuanp/nerdtree-git-plugin' | |
| Plug 'chr4/nginx.vim' | |
| Plug 'chrisbra/Colorizer' | |
| Plug 'ctrlpvim/ctrlp.vim' | |
| Plug 'embear/vim-localvimrc' | |
| Plug 'flazz/vim-colorschemes' | |
| Plug 'groenewege/vim-less' |
| import UIKit | |
| protocol CommandExecuting { | |
| func run(commandName: String, arguments: [String]) throws -> String | |
| } | |
| enum BashError: Error { | |
| case commandNotFound(name: String) | |
| } |
| # Swift syntax highlighting for Vim | |
| # Source: http://wingsquare.com/blog/swift-script-syntax-highlighting-and-indentation-for-vim-text-editor/ | |
| echo "--- Installing and configuring Pathogen.." | |
| mkdir -p ~/.vim/autoload ~/.vim/bundle | |
| curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim | |
| echo "execute pathogen#infect() | |
| syntax on |
| import Cocoa | |
| // for-in | |
| func checkForIn(array: [Int], dict: [Int: String]) { | |
| for num in array where dict[num] != nil { | |
| num | |
| } | |
| } | |
| checkForIn([1,2,3,4], dict: [1:"one", 2:"two"]) |