Skip to content

Instantly share code, notes, and snippets.

View DominikBucher12's full-sized avatar
🚀
#YOLO

Dominik Bucher DominikBucher12

🚀
#YOLO
View GitHub Profile
@ManWithBear
ManWithBear / multi_devices_test.sh
Created April 20, 2018 15:01 — forked from fedejordan/multi_devices_test.sh
Blog01 - Script for run tests in different devices for an iOS project
#!/bin/bash
# Script configuration
devicesArray=(
"iPhone 8"
"iPhone 8 Plus"
"iPhone 5s"
"iPhone X")
@EricADockery
EricADockery / Fastfile
Created July 25, 2017 16:42
Parallel iOS Testing using Bluepill
lane :bluepill do
scan(scheme: “myApp”, build_for_testing: true)
sh “bash ./bluepill.sh“
end
@ManWithBear
ManWithBear / delete_all_simulators.sh
Created September 19, 2018 08:18
Script to delete all your simulators
#!/bin/bash
xcrun simctl delete $(xcrun simctl list | grep -o '[0-9A-F]\{8\}-[0-9A-F]\{4\}-[0-9A-F]\{4\}-[0-9A-F]\{4\}-[0-9A-F]\{12\}' | xargs)
xcrun simctl delete unavailable
@ManWithBear
ManWithBear / xcode.md
Last active September 25, 2018 08:35
Move open bracket on new line in default xcode snippets
  1. Find SystemCodeSnippets.codesnippets file. For Xcode8:
    /Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Resources/SystemCodeSnippets.codesnippets
  2. Make save copy of snippets cp SystemCodeSnippets.codesnippets ~/Desktop/
  3. Open in vim: sudo vim SystemCodeSnippets.codesnippets
  4. Move every open bracket on new line :%s/ {/\r{/g
  5. Save and close :wq
  6. Restart Xcode
  7. ????
  8. PROFIT!
@erbmicha
erbmicha / compile_xibs
Created May 27, 2012 04:08
Compile XIB files into NIB files for RubyMotion projects
#!/bin/bash
XIBS="*.xib
app/*.xib
interfaces/*.xib
resources/*.xib"
for i in $XIBS
do
echo "Compiling `basename $i`..."
ibtool --compile resources/`basename -s .xib $i`.nib $i
/// `ObjectBinding` used as a way to create a `Binding` from a `BindableObject`. In this case the ViewModel
/// complies with `BindableObject` which is then translated into a `Binding` which is what `Toggle` is expecting
/// NOTE: Since it's a `DynamicViewProperty`, after its value is changed, the body will be updated.
class ViewModel: BindableObject {
let didChange = PassthroughSubject<ViewModel, Never>()
var isEnabled = false {
didSet {
didChange.send(self)
T@"<NSTouchBarCustomizationCursorManagerDelegate>",W,V_delegate
T@"<NSTouchBarPressAndHoldTransposerDelegate>",W,V_delegate
T@"NSTouchBarItem",&,V_touchBarItem
NSTouchBarLogOnTouches
NSTouchBarViewObservationContext
T@"NSTouchBarViewController",R,V_applicationTouchBarViewController
T@"NSTouchBarCustomizationController",R
T@"NSTouchBarCustomizationPreviewItemContainerView",R
/Library/Caches/com.apple.xbs/Sources/AppKit/AppKit-1504.60/TouchBar.subproj/NSTouchBarCustomizationPreviewCollectionViewItem.m
T@"NSTouchBar",&
@ericdke
ericdke / emojiImage.swift
Created June 17, 2017 08:56
Swift 4 String extension for converting an emoji to an NSImage. Idea and original code by Daniel Jalkut http://indiestack.com/2017/06/evergreen-images/.
import Cocoa
extension String {
// https://stackoverflow.com/a/36258684/2227743
var containsEmoji: Bool {
for scalar in self.unicodeScalars {
switch scalar.value {
case 0x1F600...0x1F64F, // Emoticons
0x1F300...0x1F5FF, // Misc Symbols and Pictographs
@jpalumickas
jpalumickas / osascript.rb
Last active July 1, 2021 11:36
osaScript Ruby examples
# === Terminal.app === #
# Open new tab in terminal.
exec("osascript -e 'tell application \"System Events\" to tell process \"Terminal\" to keystroke \"t\" using command down' > /dev/null 2>&1 ")
# Open directory
exec("osascript -e 'tell application \"Terminal\" to do script \"cd directory\" in selected tab of the front window' > /dev/null 2>&1 ")
# Open directory in new tab (this is better)
exec("osascript -e 'tell application \"Terminal\"' -e 'tell application \"System Events\" to tell process \"Terminal\" to keystroke \"t\" using command down' -e 'do script with command \"cd directory && clear\" in selected tab of the front window' -e 'end tell' > /dev/null 2>&1")
@ManWithBear
ManWithBear / create_simulators
Last active January 17, 2022 15:18
Create my simulators setup
#!/bin/bash
xcrun simctl delete $(xcrun simctl list | grep -o '[0-9A-F]\{8\}-[0-9A-F]\{4\}-[0-9A-F]\{4\}-[0-9A-F]\{4\}-[0-9A-F]\{12\}' | xargs)
xcrun simctl delete unavailable
runtime="com.apple.CoreSimulator.SimRuntime.iOS-12-2"
xcrun simctl create "1. Monday (X)" com.apple.CoreSimulator.SimDeviceType.iPhone-X $runtime
xcrun simctl create "2. Tuesday (Air 2)" com.apple.CoreSimulator.SimDeviceType.iPad-Air-2 $runtime
xcrun simctl create "3. Wednesday (8)" com.apple.CoreSimulator.SimDeviceType.iPhone-8 $runtime
xcrun simctl create "4. Thursday (8 Plus)" com.apple.CoreSimulator.SimDeviceType.iPhone-8-Plus $runtime
xcrun simctl create "5. Friday (SE)" com.apple.CoreSimulator.SimDeviceType.iPhone-SE $runtime