Skip to content

Instantly share code, notes, and snippets.

View anaulin's full-sized avatar
😻
doin' stuff

Ana Ulin anaulin

😻
doin' stuff
View GitHub Profile
@anaulin
anaulin / config.md
Last active March 26, 2018 01:12
Incantation: Make Mac OS X add SSH keys with password to your ssh agent on login

Two steps:

  1. On the command line, just once, run this command to add the SSH key with its password to your Mac keychain:
ssh-add -K <path to key>   # typically your key is something like: ~/.ssh/id_rsa
  1. Tell your ssh config to use the keys from the keychain. In ~/.ssh/config, add: Host * UseKeyChain yes

Keybase proof

I hereby claim:

  • I am anaulin on github.
  • I am anaulin (https://keybase.io/anaulin) on keybase.
  • I have a public key whose fingerprint is 75B4 784E 35AE 51CC 4B04 2469 A9F6 C2A1 717A BB23

To claim this, I am signing this object:

@anaulin
anaulin / unused.sh
Created December 4, 2015 00:56
Quickie script to find unused requires in a Coffeescript/JavaScript codebase
FILES=`find src/ -name "*.coffee"`
for f in $FILES
do
REQUIRES=`awk '/=(.*)require/ {print $0}' $f | awk '{sub(/=.*require.*/, "")}; 1' | awk '{sub(/.*[\{\,\}].*/, "")}; 1'`
for require in $REQUIRES
do
MATCHING_LINE_COUNT=`grep "$require" $f | wc -l`
# There will be always at least 1 matchin line (the require itself)
if [ $MATCHING_LINE_COUNT = "1" ]; then
echo " * unused require: $require in: $f"