Changes with .dev domains in
mind.
Create /etc/pf.anchors/dev, containing:
rdr pass inet proto tcp from any to any port 80 -> 127.0.0.1 port 8080
rdr pass inet proto tcp from any to any port 443 -> 127.0.0.1 port 8443
| // Permission to use, copy, modify, and/or distribute this software for | |
| // any purpose with or without fee is hereby granted. | |
| // | |
| // THE SOFTWARE IS PROVIDED “AS IS” AND THE AUTHOR DISCLAIMS ALL | |
| // WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES | |
| // OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE | |
| // FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY | |
| // DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN | |
| // AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT | |
| // OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
| version: "3.3" | |
| services: | |
| ################################################ | |
| #### Traefik Proxy Setup ##### | |
| ############################################### | |
| traefik: | |
| image: traefik:v2.0 | |
| restart: always |
| property destinationFolder : "Path:to:AirDrop:Folder:in:Alias:format" -- Please change this | |
| property quarantineTypes : { "59" } | |
| on run {input, parameters} | |
| tell application "Finder" | |
| set filesToMove to {} | |
| repeat with iInput from 1 to count input | |
| set filePath to item iInput of input | |
| set shouldProcess to false | |
| if (count quarantineTypes) > 0 then |
| import Foundation | |
| import CoreAudio | |
| var propertyAddress = AudioObjectPropertyAddress(mSelector: kAudioHardwarePropertyDevices, mScope: kAudioObjectPropertyScopeGlobal, mElement: kAudioObjectPropertyElementMaster) | |
| var propertySize:UInt32 = 0 | |
| if AudioObjectGetPropertyDataSize(AudioObjectID(kAudioObjectSystemObject), &propertyAddress, 0, nil, &propertySize) == noErr { | |
| let numDevices = Int(propertySize) / MemoryLayout<AudioDeviceID>.size |
Changes with .dev domains in
mind.
Create /etc/pf.anchors/dev, containing:
rdr pass inet proto tcp from any to any port 80 -> 127.0.0.1 port 8080
rdr pass inet proto tcp from any to any port 443 -> 127.0.0.1 port 8443
| #import <Contacts/Contacts.h> | |
| @implementation ContactsScan | |
| - (void) contactScan | |
| { | |
| if ([CNContactStore class]) { | |
| //ios9 or later | |
| CNEntityType entityType = CNEntityTypeContacts; | |
| if( [CNContactStore authorizationStatusForEntityType:entityType] == CNAuthorizationStatusNotDetermined) |