Skip to content

Instantly share code, notes, and snippets.

View Dafin's full-sized avatar
🤓
Hello world!

Dafin Aziz Dafin

🤓
Hello world!
View GitHub Profile
@Dafin
Dafin / Refresh_Safari.txt
Created February 27, 2018 19:41
Applescript to reload safari browser
tell application "Safari"
set docUrl to URL of document 1
set URL of document 1 to docUrl
end tell
@Dafin
Dafin / remove_node_el-cap
Created February 11, 2018 18:31
Remove default node from El Capitan
curl -ksO https://gist.github.com/nicerobot/2697848/raw/uninstall-node.sh
chmod +x ./uninstall-node.sh
./uninstall-node.sh
rm uninstall-node.sh
@Dafin
Dafin / shutup.sh
Created May 10, 2017 21:15
An attempt to silence the chime/bong on startup of pre 2016 mac hardware
sudo nvram SystemAudioVolume="%00" # does nothing
osascript -e 'set volume with output muted'
echo "run at $(date)" >> /var/log/silence_log.txt
#sudo defaults write com.apple.loginwindow LogoutHook /path/to/silence.sh
#Looking at the Observer Pattern
class Chore
attr_accessor :name, :is_done, :by_who
def initialize(name)
self.name = name
self.is_done = false
end
[[ -s "$HOME/.profile" ]] && source "$HOME/.profile" # Load the default .profile
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
# Shoes
export PATH=$PATH:/Applications/Shoes.app/Contents/MacOS/
@Dafin
Dafin / .gitignore
Last active April 4, 2016 02:30 — forked from octocat/.gitignore
Some common .gitignore configurations
## https://github.com/github/gitignore for more!!!
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so