Skip to content

Instantly share code, notes, and snippets.

@menushka
menushka / airdropSorter.scpt
Created December 30, 2018 22:47
A Folder Action script written in AppleScript used to separate AirDropped files into a different folder other than the default Downloads folder
property AIRDROP_FOLDER : "Path:to:AirDrop:Folder:in:Alias:format"
property QUARANTINE_KEY : "59"
property GET_QUARANTINE_COMMAND_START : "ls -l -@ '"
property GET_QUARANTINE_COMMAND_END : "' | tr '\\n' ' ' | sed 's/.*com\\.apple\\.quarantine\\s*\\(\\d*\\)/ \\1/' | awk '{$1=$1};1'"
on adding folder items to this_folder after receiving added_items
repeat with i from 1 to length of added_items
set current_item to item i of added_items
set quarantine_type to getQuarantineType(POSIX path of current_item)
@dabrovnijk
dabrovnijk / IPv6_Gavlenet_complete.txt
Last active December 30, 2024 12:38
Edgerouter lite, Gavlenet, complete IPv6 settings with VPN
# Version: v1.10.8
# Build ID: 5142440
# Build on: 11/20/18 16:45
# Copyright: 2012-2018 Ubiquiti Networks, Inc.
# HW model: EdgeRouter Lite 3-Port
#
# Gavlenet Edgerouter lite
#
# Complete settings with Firewall and VPN
#
@490398290
490398290 / TeamViewer-id-changer.py
Created February 19, 2019 12:51
TeamViewer ID Changer for MAC OS
#!/usr/bin/env python
#coding:utf-8
import sys
import os
import glob
import platform
import re
import random
import string
@geoffyuen
geoffyuen / firestick4k.md
Last active July 5, 2025 08:28
Amazon Fire Stick 4k Tips and Tricks
@talkingmoose
talkingmoose / Manage App Notifications.bash
Last active January 25, 2024 15:26
macOS Catalina will prompt users to allow Notifications from each app that makes a request. Administrators can manage these prompts using a Configuration Profile. If running Jamf Pro 10.19 or later, I suggest instead using this manifest: https://github.com/talkingmoose/jamf-manifests/blob/master/macOS%20Notifications%20(com.apple.notificationset…
#!/bin/bash
<<ABOUT_THIS_SCRIPT
-----------------------------------------------------------------------
Written by:William Smith
Professional Services Engineer
Jamf
[email protected]
https://gist.github.com/talkingmoose/9faf50deaaefafa9a147e48ba39bb4b0
@dvf
dvf / change-codec.md
Last active July 7, 2025 11:42
Enable High Quality mode on your headphones (Updated for macOS Catalina)

If you're using a high-end bluetooth headset on your Macbook Pro it's likely your mac is using an audio codec which favors battery efficiency over high quality. This results in a drastic degradation of sound, the SBC codec is the likely culprit, read more about it here.

Find out what codec you're using

  1. Play a song on your headphones
  2. Option (⌥) click the Bluetooth button at the top of your screen Inspect the Bluetooth Coded
  3. If you're using AAC or aptX, you can stop here—those are the highest quality codecs.

Change your codec to AAC or aptX

@huksley
huksley / disabling-photoanalysisd.md
Last active July 4, 2025 19:55
Disabling photoanalysisd

For what it's worth (and with all the usual disclaimers about potentially making your mac unstable by disabling system services), here's some commands that will manipulate this service and services like it. Note the $UID in the command, that's just a bash shell variable that will resolve to some number. That's your numeric UID. You just run these commands from a Terminal command line. No special privileges needed.

If you want to disable it entirely, the first command stops it from respawning, and the second kills the one that is currently running:

launchctl disable gui/$UID/com.apple.photoanalysisd
launchctl kill -TERM gui/$UID/com.apple.photoanalysisd

(If you kill it without disabling it will die, but a new one will respawn and pick up where the old one left off)

@devnoname120
devnoname120 / My macOS setup.md
Last active July 20, 2025 06:30
My macOS setup

ℹ️ Enable iCloud end-to-end encryption:

  • Nobody knows that, but iCloud actually supports end-to-end encryption (see “Advanced Data Protection for iCloud”) but it's disabled by default. If you care about data privacy, you should turn it on.
    • System settingsApple IDiCloud → Set Advanced Data Protection to On.
    • System settingsApple IDiCloud → Disable Access iCloud Data on the Web.
  • It supports almost all the native Apple apps, with the notable exceptions of iCloud Mail, Contacts, and Calendars. See official data protection matrix for more info.

Table of Contents

@krisnova
krisnova / unifi.md
Created March 26, 2020 22:47
Hacking on my unifi network

Corona virus debugging 2020

So I have been stuck at home and was getting between 30% and 55% packet loss intermittently.

I was getting constant "your connection is unstable" messages in zoom and dropping calls every 60-120 seconds or so

It would hang for a moment and then reconnect.

At first I thought it was just that everyone was at home using internet, but then I isolated my connection and connected my laptop straight to my modem and the issue was resolved.

@krisnova
krisnova / unifi.md
Created March 26, 2020 22:47
Hacking on my unifi network

Corona virus debugging 2020

So I have been stuck at home and was getting between 30% and 55% packet loss intermittently.

I was getting constant "your connection is unstable" messages in zoom and dropping calls every 60-120 seconds or so

It would hang for a moment and then reconnect.

At first I thought it was just that everyone was at home using internet, but then I isolated my connection and connected my laptop straight to my modem and the issue was resolved.