<commit_before>#! /usr/bin/env bash

# Close any open System Preferences panes, to prevent them from overriding
# settings we’re about to change
osascript -e 'tell application "System Preferences" to quit'

# Ask for the administrator password upfront
sudo -v

# # Keep-alive: update existing `sudo` time stamp until `.osx` has finished
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &

# Set computer name
# while [[ ! $computername ]]; do
#   read -p "What is this computer's name? " computername
# done

computername="Svolvær"

sudo scutil --set ComputerName $computername
sudo scutil --set LocalHostName `echo $computername | iconv -t ASCII//TRANSLIT`
sudo scutil --set HostName $computername

# ###############################################################################
# # General UI/UX                                                               #
# ###############################################################################
#
# # Disable transparency in the menu bar and elsewhere on Yosemite
# # defaults write com.apple.universalaccess reduceTransparency -bool true
#
# # Set sidebar icon size to medium
# # defaults write NSGlobalDomain NSTableViewDefaultSizeMode -int 2
#
# # Increase window resize speed for Cocoa applications
# # defaults write NSGlobalDomain NSWindowResizeTime -float 0.001
#
# # Expand save panel by default
# defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true
# defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode2 -bool true
#
# # Expand print panel by default
# defaults write NSGlobalDomain PMPrintingExpandedStateForPrint -bool true
# defaults write NSGlobalDomain PMPrintingExpandedStateForPrint2 -bool true
#
# # Save to disk (not to iCloud) by default
# defaults write NSGlobalDomain NSDocumentSaveNewDocumentsToCloud -bool false
#<commit_msg>Don’t hardcode computer name<commit_after>#! /usr/bin/env bash

# Close any open System Preferences panes, to prevent them from overriding
# settings we’re about to change
osascript -e 'tell application "System Preferences" to quit'

# Ask for the administrator password upfront
sudo -v

# # Keep-alive: update existing `sudo` time stamp until `.osx` has finished
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &

Set computer name
while [[ ! $computername ]]; do
  read -p "What is this computer's name? " computername
done

sudo scutil --set ComputerName $computername
sudo scutil --set LocalHostName `echo $computername | iconv -t ASCII//TRANSLIT`
sudo scutil --set HostName $computername

# ###############################################################################
# # General UI/UX                                                               #
# ###############################################################################
#
# # Disable transparency in the menu bar and elsewhere on Yosemite
# # defaults write com.apple.universalaccess reduceTransparency -bool true
#
# # Set sidebar icon size to medium
# # defaults write NSGlobalDomain NSTableViewDefaultSizeMode -int 2
#
# # Increase window resize speed for Cocoa applications
# # defaults write NSGlobalDomain NSWindowResizeTime -float 0.001
#
# # Expand save panel by default
# defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true
# defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode2 -bool true
#
# # Expand print panel by default
# defaults write NSGlobalDomain PMPrintingExpandedStateForPrint -bool true
# defaults write NSGlobalDomain PMPrintingExpandedStateForPrint2 -bool true
#
# # Save to disk (not to iCloud) by default
# defaults write NSGlobalDomain NSDocumentSaveNewDocumentsToCloud -bool false
#
{'fraction_non_alphanumeric': 0.1518987341772152, 'fraction_numerical': 0.005925127928898465, 'mean_word_length': 4.461764705882353, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4205521', 'n_tokens_mistral': 1020, 'n_tokens_neox': 952, 'n_words': 370}