Skip to content

Instantly share code, notes, and snippets.

View klauslanza's full-sized avatar

Klaus Lanzarini klauslanza

  • Brescia
View GitHub Profile
@klauslanza
klauslanza / FixBTSound.applescript
Created November 9, 2018 11:20 — forked from mluisbrown/FixBTSound.applescript
AppleScript to set macOS audio input device to "Internal Microphone"
-- Sets your audio input source to "Internal Microphone"
-- Frequently needed if you use bluetooth headpohones and
-- run the Xcode iOS simulator, which will often set your
-- headphones to be the input device, resulting in a drastic
-- decrease in sound quality, and making it mono
tell application "System Preferences" to activate
tell application "System Preferences"
reveal anchor "input" of pane id "com.apple.preference.sound"
end tell
@klauslanza
klauslanza / URLRequest+Extensions.swift
Last active April 3, 2018 06:50
URLRequest debugging -> Print the CURL
extension URLRequest {
public var curlString: String {
#if !DEBUG
return ""
#else
var result = "curl -k "
if let method = httpMethod {
result += "-X \(method) \\\n"