Skip to content

Instantly share code, notes, and snippets.

@nikolay-n
nikolay-n / defsmon.py
Last active October 29, 2022 14:26
Defaults Monitor - tool to sniff defaults keys and values using unified log
#!/usr/bin/python2.7
# -*- coding: utf-8 -*-
'''
Defaults Monitor - tool to sniff defaults keys and values using unified log
to launch use standard python 2.7, eg python2.7 ./defsmon.py
'''
import os
@MVKozlov
MVKozlov / Show-MessageBox.ps1
Last active June 1, 2023 14:15
Powershell: Show GUI Messagebox and wait for user input or timeout
<#
.SYNOPSIS
Show GUI Messagebox
.DESCRIPTION
Show GUI Messagebox and wait for user input or timeout
.PARAMETER Message
Message to show
.PARAMETER Title
Messagebox title
.PARAMETER Buttons
@soundsnw
soundsnw / standard-user-access.sh
Created June 11, 2019 12:33
Give macOS standard users access to networking, printing and more
#!/bin/sh
#
# Provides standard user access to preference panels they would expect to be able to access, and might need access to.
#
# Provides standard users access to system preferences
/usr/bin/security authorizationdb write system.preferences allow
@AveYo
AveYo / .. MediaCreationTool.bat ..md
Last active April 26, 2024 17:20
Universal MediaCreationTool wrapper for all MCT Windows 10 versions - MOVED TO github.com/AveYo/MediaCreationTool.bat
@aleksandrs-ledovskis
aleksandrs-ledovskis / README.md
Last active November 11, 2023 01:06
Lock Spotify version (macOS)
  1. Create new Automator application with Run Shell script action (exact steps below).

    1. Open Automator.app (e.g. from Spotlight)
    2. Select File → New in menu
    3. Select "Application", click "Choose"
    4. With "Actions" toggle selected, type "Run Shell Script" in filter box, double click on filtered item
  2. Put contents from lock_spotify_version.sh into script's body (exact steps below).

  3. In opened right-hand item select /bin/sh as "Shell" type and copy contents of Gist's "lock_spotify_version.sh" below/in text area

@fallroot
fallroot / manipulating-plist-in-macos-cli.md
Created August 7, 2017 06:08
Manipulating Property List in macOS Command Line

Manipulating Property List in macOS Command Line

Tools

⚠️ defaults 명령어는 홈 경로(~)는 인식하지만 상대 경로(., ..)는 인식하지 않는다.

@gregneagle
gregneagle / fancy_defaults_read.py
Last active February 6, 2024 15:14
fancy_defaults_read.py: Reads a preference, prints its value, type, and where it is defined.
#!/usr/bin/python
import os
import sys
from CoreFoundation import (CFPreferencesAppValueIsForced,
CFPreferencesCopyAppValue,
CFPreferencesCopyValue,
kCFPreferencesAnyUser,
kCFPreferencesAnyHost,
@nuada
nuada / set_icon.sh
Created February 22, 2017 12:12
Set custom icon of Mac OS X folder or file using resource forks.
#!/bin/bash
# usage: set_icon.sh <some.icns or image_file> <folder or file path>
# Based on: http://www.amnoid.de/icns/makeicns.html
icon="$1"
target="$2"
if [[ -d "${target}" ]]; then
target_icon="${target}"/$'Icon\r'
else
target_icon="${target}"
FROM debian:jessie
ARG VERSION=0.12.1
ARG SHA256HASH=34de171ac1b48b0780d68f3844c9fd2e8bfe6a7780b55e1f012067c2440ebd8a
RUN apt-get update && \
apt-get install -y wget ca-certificates && \
apt-get clean && \
wget https://www.bitcoinunlimited.info/downloads/bitcoinUnlimited-${VERSION}-linux64.tar.gz && \
@noestreich
noestreich / FritzboxVPN.mobileconfig.xml
Last active March 13, 2022 18:33
Eine Profildatei zum Regeln von VPN-on-Demand Verbindungen zwischen iPhone und FRITZ!Box. Siehe: http://www.iphone-ticker.de/?p=97462
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PayloadContent</key>
<array>
<dict>
<key>IPSec</key>
<dict>
<key>AuthenticationMethod</key>