Skip to content

Instantly share code, notes, and snippets.

View vityapoekhal's full-sized avatar
🚜
я как плуг, пашу этот луг

Vitya Poekhal vityapoekhal

🚜
я как плуг, пашу этот луг
View GitHub Profile
import UIKit
extension CGRect {
public static var unbounded: CGRect {
return CGRect(origin: .zero, size: .unbounded)
}
public var center: CGPoint {
return CGPoint(x: midX, y: midY)
}
@vityapoekhal
vityapoekhal / ffmpeg.md
Created November 9, 2019 20:59 — forked from protrolium/ffmpeg.md
using ffmpeg to extract audio from video files

ffmpeg

Converting Audio into Different Formats / Sample Rates

Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma

You can get the list of supported formats with:
ffmpeg -formats

Convert WAV to MP3, mix down to mono (use 1 audio channel), set bit rate to 64 kbps and sample rate to 22050 Hz:

@vityapoekhal
vityapoekhal / UIColorExtension.swift
Created October 17, 2017 10:32 — forked from sauvikatinnofied/UIColorExtension.swift
MediumBlog Color Constant
extension UIColor {
/**
Creates an UIColor from HEX String in "#363636" format
- parameter hexString: HEX String in "#363636" format
- returns: UIColor from HexString
*/
convenience init(hexString: String) {