This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// GetLinesStrings.swift | |
// | |
// Created by Dominik Bucher on 22/10/2017. | |
// Copyright © 2017 Dominik Bucher. All rights reserved. | |
// | |
/// This method should be universal and implemented right from Apple. | |
/// gets specified text from line indexes | |
/// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This is just very simple script (No error checking) for transformating the | |
# tunnelblick VPN configuration with multiple files | |
# into one file which contains the keys and certs in tags instead of separate file. | |
# This is good for example for using openVPN in Mobile devices, where you cannot put the Tunnelblick | |
# configuration file. | |
# Usage: | |
# - 1. Open terminal and change your directory to |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on run argv | |
set criteria to {"Portrait", "Landscape Left", "Landscape Right", "Portrait Upside Down"} | |
if (count of argv) = 2 and (item 1 of argv) is in criteria then | |
set theExpectedWindowCount to item 2 of argv as integer | |
(* First we start with system event to work on Simulator and set it to foreground...*) | |
tell application "Simulator" to activate | |
tell application "System Events" to tell process "Simulator" | |
set frontmost to true | |
set counter to 0 | |
(* Then we iterate over windows in the process, simulator variable is here in fact the window *) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
JSON_HEADER="Content-Type:application/json" | |
echo -n "Please enter your Working email:" | |
echo | |
read email | |
echo -n "Please enter your password:" | |
read -s password |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Create landscape devices | |
# You should run this script everytime you install new Xcode with updated iOS version, because Xcode automatically deletes the older custom created simulators. | |
# This just works, we need to find better solution to get the runtime. I think this should do for a while. | |
runtime=$(xcrun simctl list runtimes | grep "iOS" | tail -1 | awk -F' - ' '{print $3F}') | |
echo $runtime |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# MARK: PATHS | |
source ~/.bashrc | |
# MARK: 🚀 Lastfane | |
export LC_ALL=en_US.UTF-8 | |
export LANG=en_US.UTF-8 | |
export GEM_PATH=/Users/dominikbucher/.rvm/rubies/ruby-2.4.1/bin/gem | |
# MARK: fkn' hkn' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on run argv | |
(*set criteria to {"Portrait", "Landscape Left", "Landscape Right", "Portrait Upside Down"}*) | |
if (count of argv) = 1 then (*and (item 1 of argv) is in criteria then*) | |
set theExpectedWindowCount to item 1 of argv as integer | |
(* First we start with system event to work on Simulator and set it to foreground...*) | |
tell application "System Events" to tell process "Simulator" | |
set frontmost to true | |
set counter to 0 | |
(* Set number of simulators containing Landscape to expected.*) | |
(* Then we iterate over windows in the process, simulator variable is here in fact the window *) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/swift | |
// Use this script to get name and version of gem passed as first argument | |
// | |
// Example usage: `swift GetFastlaneVersion.swift fastlane 1.0.2` | |
// | |
// Arguments: - `gem` - The name of gem you want to inspect. | |
// - `version` - The version you want to compare against the repo | |
// | |
// Because whole script runs in one thread, we need to use Semaphore to hold the thread until | |
// It finishes the asynch URLRequest. No mutex sorry 😔 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public extension UIDevice { | |
/// This enum gives us simple way how to recognize which UIDevice size | |
/// | |
/// For the resolutions, refer to | |
/// Apple official website: | |
/// https://developer.apple.com/library/archive/documentation/DeviceInformation/Reference/iOSDeviceCompatibility/Displays/Displays.html | |
/// Because the documentation is missing, I ran simulators and manually checked some resolutions on | |
/// `UIScreen.main.bounds` (for Xr, XS Max and 11-inch iPhones) Apple somehow doesn't update the documentation. | |
enum DeviceSize: CaseIterable { | |
// iPhones: |