Skip to content

Instantly share code, notes, and snippets.

View max-potapov's full-sized avatar
🌴
On vacation

Maxim V. Potapov max-potapov

🌴
On vacation
View GitHub Profile
extension UIViewController {
func adjustTableViewInsects(tableView: UITableView?) {
guard let tableView = tableView, let navigationController = navigationController else {
return
}
automaticallyAdjustsScrollViewInsets = false
let statusBarHeight = UIApplication.sharedApplication().statusBarFrame.size.height
let navigationBarHeight = navigationController.navigationBar.bounds.size.height
#!/bin/sh
rm -rf ~/Library/Developer/CoreSimulator/Devices
killall -9 com.apple.CoreSimulator.CoreSimulatorService
@max-potapov
max-potapov / p12_to_pem.sh
Created September 10, 2015 07:58
convert p12 certificates to pem
#!/bin/sh
for i in $(find . -name "*.p12"); do
IN=$i
OUT=$(echo $i | sed 's/\.p12/.pem/g')
openssl pkcs12 -in $IN -out $OUT -nodes -clcerts
done
@max-potapov
max-potapov / makeall-ios.sh
Created August 30, 2013 11:39
makeall script for fetch, build and run webrtc for ios
#!/bin/sh
# gclient can be found here:
# git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
# don't forget modify .bashrc:
# export PATH="$PATH":`pwd`/depot_tools
function fetch() {
echo "-- fetching webrtc"