How to make an application icon for macOS using
iconset
&iconutil
Discover gists
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sysadminctl is a tool Apple introduced in 10.10 for working with system user accounts. In 10.13, | |
sysadminctl is Apple's recommended tool for working with user accounts in the CLI, replacing functionality | |
that has long been provided by dscl and adds new features available only in 10.13. | |
sysadminctl can be used to change user passwords, create new users (including automatically provisioning | |
the user home folder) or check the status of a new-to-10.13 security feature named SecureToken. | |
SecureToken is a user attribute like password type or user home location. SecureToken is not publicly | |
documented by Apple so it is not possible to provide a full technical description, but in practice one | |
needs only to know if a user has SecureToken or not. Having SecureToken set signifies that a user can | |
unlock a FileVault-encrypted volume. Without the SecureToken bit on a user account, that user will not |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############### | |
# SINFO aliases | |
############### | |
# Detailed sinfo | |
alias si="sinfo -o '%8P %10n %.11T %.4c %.8z %.6m %12G %10l %10L %10O %20E' -S '-P'" | |
# sinfo only on GPU partition | |
alias sig="si -p gpu" | |
# sinfo only on CPU partition | |
alias sic="si -p cpu" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Updated to reflect changes introduced with 10.13.4. Update to 10.13.4 if needed before attempting to make | |
SecureToken-related changes. ### | |
sysadminctl is a tool Apple introduced in 10.10 for working with system user accounts. In 10.13, sysadminctl is Apple's | |
recommended tool for working with user accounts in the CLI, replacing functionality that has long been provided by dscl | |
and adds new features available only in 10.13. sysadminctl can be used to change user passwords, create new users or | |
check the status of a new-to-10.13 security feature named SecureToken. | |
SecureToken is a non-visible APFS file system attribute, unlike the SIP protected flag or file creation date, that triggers | |
the creation of a new AuthenticationAuthority entry in a user's local account record |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"errors" | |
"fmt" | |
"time" | |
) | |
func main() { | |
dur, _ := ParseDuration("1.000000001s") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var huginn = window.location.protocol + "//" + window.location.host | |
var auth_key = document.getElementsByName("csrf-token")[0].content; | |
for (var a in window.agentPaths) { | |
var url = huginn + window.agentPaths[a].match(/\/agents\/\d+/)[0] + "/remove_events" | |
console.log(url) | |
$.post(url,"_method=delete&authenticity_token=" + auth_key,function(data,success,xhr){ | |
console.log("finish",url) | |
}) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Wants=network-pre.target | |
Before=network-pre.target shutdown.target | |
[Service] | |
User=root | |
ExecStart=/bin/sh -ec '\ | |
[ -x /usr/bin/wslinfo ] && [ "$(/usr/bin/wslinfo --networking-mode)" = "mirrored" ] || exit 0;\ | |
echo "\ | |
add chain ip nat WSLPREROUTING { type nat hook prerouting priority dstnat - 1; policy accept; };\ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const app = Application.currentApplication() | |
app.includeStandardAdditions = true | |
function getJSON(path) { | |
const fullPath = path.replace(/^~/, app.pathTo('home folder')) | |
const contents = app.read(fullPath) | |
return JSON.parse(contents) | |
} | |
function run() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#=========================================== | |
# Download URLs for the required libraries. | |
#=========================================== | |
# NOTE: if you add a URL here, you also need to add it to the | |
# $packages_to_build list to ensure the proper order. | |
declare -A urls=( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'Attribute VB_Name = "GetLocalOneDrivePath" | |
' | |
' Cross-platform VBA Function to get the local path of OneDrive/SharePoint | |
' synchronized Microsoft Office files (Works on Windows and on macOS) | |
' | |
' Author: Guido Witt-Dörring | |
' Created: 2022/07/01 | |
' Updated: 2024/04/23 | |
' License: MIT | |
' |
NewerOlder