Skip to content

Instantly share code, notes, and snippets.

View itsnwa's full-sized avatar

Nichlas Wærnes Andersen itsnwa

View GitHub Profile
@itsnwa
itsnwa / macos-boot-sound.md
Last active January 5, 2017 20:13
Control macOS default boot up sound

Turn it off

$ sudo nvram SystemAudioVolume=%80

Turn it on

$ sudo nvram -d SystemAudioVolume

@itsnwa
itsnwa / bootable-macos.md
Last active January 30, 2020 14:42
Create bootable macOS USB drive

Make sure the USB drive is at least 16gb and named "Untitled"

$ sudo /Applications/Install\ macOS\ Catalina.app/Contents/Resources/createinstallmedia --volume /Volumes/Untitled /Applications/Install\ macOS\ Catalina.app --nointeraction &&say Done

Remove the default delay on auto show/hide macOS dock

$ defaults write com.apple.Dock autohide-delay -float 0 && killall Dock

@itsnwa
itsnwa / remove-git-ignored-files.md
Last active February 25, 2024 14:52
Remove files git ignored files from remote repository

$ git rm -r --cached . && git add . && git commit -m "Removing all files in .gitignore"

@itsnwa
itsnwa / .bash_profile
Created July 31, 2016 06:17
Show working directory and git branch in terminal prompt
# Load in the git branch prompt script.
source ~/.git-prompt.sh
export PS1="[\W\$(__git_ps1)]\[\033[00m\]\$ "
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="description" content="Give the site a description">
<meta name="author" content="Put a name here" />
<meta name="HandheldFriendly" content="true" />
<meta name="MobileOptimized" content="320" />
@itsnwa
itsnwa / pigments-droplet.css
Last active March 10, 2017 17:08
Atom (Pigments hack): Replace dot with a droplet
/* Add this to your Atom stylesheet */
atom-text-editor pigments-markers pigments-color-marker.dot,
atom-text-editor pigments-markers pigments-color-marker.dot,
atom-text-editor pigments-color-marker.dot {
transform: translate(0%, -50%) scale(.6) rotate(45deg);
border-top-left-radius: 0;
border-top-right-radius: 75px;
border-bottom-right-radius: 75px;
border-bottom-left-radius: 75px;
}