Skip to content

Instantly share code, notes, and snippets.

View chipxsd's full-sized avatar

Klemen Verdnik chipxsd

  • San Francisco, California
View GitHub Profile
@chipxsd
chipxsd / swift_vim_syntax_guide.md
Last active May 23, 2023 22:16
Enable Swift Syntax Highlighting in Vim

How to Enable Syntax Highlighting in Vim for Swift

Make a shallow git clone of the official Swift repo and make a symbolic link from Swift's utils vim directory into ~/.vim/pack/bundle/start:

mkdir -p ~/.vim/pack/bundle/start
cd ~/Developer
git clone --depth 1 git@github.com:apple/swift.git
cd swift
ln -s ~/Developer/swift/utils/vim ~/.vim/pack/bundle/start/swift
@chipxsd
chipxsd / alert_trolling.sh
Created April 8, 2013 11:04
Have you ever found an unlocked MacBook in your office? Download this on your victim's MacBook, chmod +x it and run it in a screen session.
#!/bin/bash
while [ 1 ]
do
afplay /System/Library/Sounds/Funk.aiff
seconds=$(((RANDOM%120+1)))
echo 'alert and wait for '$seconds' seconds'
sleep $seconds
done