Skip to content

Instantly share code, notes, and snippets.

View dylanmaryk's full-sized avatar

Dylan Maryk dylanmaryk

View GitHub Profile
@vguerci
vguerci / bitrise-better-logs.user.js
Last active October 25, 2022 10:17
Bitrise better logs user script
// ==UserScript==
// @name Bitrise better logs
// @namespace http://tampermonkey.net/
// @version 1.0.3
// @description Auto load entire log, expand steps and scroll to the first step failure, or follow if job running, or bottom
// @author Vincent Guerci
// @match https://app.bitrise.io/build/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=bitrise.io
// @grant none
// @downloadURL https://gist.github.com/vguerci/59952cc81761d2b2f6aaa2f59bf862a8/raw/bitrise-better-logs.user.js
@warrenseine
warrenseine / aws-vpn-auto-close.user.js
Last active January 24, 2023 12:40
Tampermonkey AWS VPN Auto-Close
// ==UserScript==
// @name AWS VPN Auto-Close
// @namespace http://tampermonkey.net/
// @match http://127.0.0.1/
// @grant window.close
// @version 1.0
// @author Warren Seine
// @description Close the tab when successful AWS VPN is on
// @icon https://a0.awsstatic.com/libra-css/images/site/fav/favicon.ico
// ==/UserScript==
@steipete
steipete / RandomColor.swift
Created April 6, 2021 17:20
Random Color for SwiftUI
extension Color {
/// Return a random color
static var random: Color {
return Color(
red: .random(in: 0...1),
green: .random(in: 0...1),
blue: .random(in: 0...1)
)
}
}
@insidegui
insidegui / statusbarfix.sh
Created March 16, 2021 23:04
Alias called "statusbarfix" which will update the status bar on any iOS Simulator that's currently running to look better for marketing images
alias statusbarfix='xcrun simctl status_bar booted override --time 9:41 --cellularMode active --cellularBars 4 --batteryState charging --operatorName ""'
@a2
a2 / install_booted.sh
Last active September 25, 2018 12:11
Installs app at argument path to all booted simulators and launches them
#!/bin/sh
if [ "$#" -ne 1 ]; then
echo "$0 <path>"
exit 1
fi
APP_PATH=$1
BUNDLE_ID=`/usr/libexec/PlistBuddy -c "Print :CFBundleIdentifier" "$APP_PATH/Info.plist"`
for DEVICE in $(xcrun simctl list -j devices | jq --raw-output ".devices[][] | select(.state == \"Booted\") | .udid"); do
@a7madgamal
a7madgamal / dark.md
Last active July 14, 2023 04:00
Dark mode for Slack on MacOS
@ivanbruel
ivanbruel / SnakeCase.swift
Last active March 19, 2023 16:42
Camel case to snake case in Swift
extension String {
func snakeCased() -> String? {
let pattern = "([a-z0-9])([A-Z])"
let regex = try? NSRegularExpression(pattern: pattern, options: [])
let range = NSRange(location: 0, length: self.characters.count)
return regex?.stringByReplacingMatches(in: self, options: [], range: range, withTemplate: "$1_$2").lowercased()
}
}
@usagimaru
usagimaru / NSImage+TintColor.swift
Last active October 12, 2023 13:39
NSImage+TintColor
import Cocoa
// This will work with Swift 5
extension NSImage {
func image(with tintColor: NSColor) -> NSImage {
if self.isTemplate == false {
return self
}
let image = self.copy() as! NSImage
@NicholasTD07
NicholasTD07 / how-to-download-iOS-simulator-in-command-line-and-install-it.md
Last active November 10, 2023 19:39
How to Download iOS Simulator (Xcode) in Command Line and Install it

How to Download iOS Simulator (Xcode) in Command Line and Install it

For faster connection speed and more flexibility.

Steps

  1. Start Xcode in command line by running this in commandline /Applications/Xcode.app/Contents/MacOS/Xcode
  2. Start downloading of the simulator
  3. Cancel it. YES CANCEL IT!
  4. You will get a message like this:
@rdempsey
rdempsey / matrix_color_scheme_iterm2
Created July 10, 2015 18:23
Matrix color scheme for iTerm2. Import with script from here: http://ngs.io/2014/05/05/iterm2-color-schemes/
{
'Ansi 7 Color' = {
'Blue Component' = '0.751819';
'Green Component' = '0.859729';
'Red Component' = '0.796432';
};
'Selected Text Color' = {
'Blue Component' = '1.000000';
'Green Component' = '1.000000';
'Red Component' = '1.000000';