Skip to content

Instantly share code, notes, and snippets.

@jyore
jyore / MacBookNetworkAliveOnSleep.md
Last active July 22, 2024 19:15
Keep Your MacBook Network Connections Alive As It Sleeps!

MacBookNetworkAliveOnSleep

As someone that regularly has multiple SSH/VPN sessions open, it can be a huge inconvience to lose all the connections when I lock my screen to get up to go to a meeting, lunch, etc. This is especially true for those connections that require two factor authentication. So, how can I tell my MacBook to keep those connections alive, even though my screen is locked?

Well, turns out that it is pretty simple. All that is needed is to run the following command.

cd /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources
sudo ./airport en0 prefs DisconnectOnLogout=NO
@jyore
jyore / GitCommands.md
Last active November 10, 2015 09:09
Useful Git Config commands

Useful Git Config Commands

This is a little doc I put together to help remember how to get back to my desired git config. It also has some useful commands that I have picked up from lessons learned in dealing with large development teams and managing lots of pull requests.

Hope this will help others as well

Setup Username/Email

Will simply setup the username and email address to publish commits under. Use the --global flag if you want to use the same information by default for all projects.

git config user.name

@jyore
jyore / git-clean.sh
Last active August 29, 2015 14:11
Git Repo Cleaner
#!/bin/bash
# Standard Prune - Removes Branches No Longer Tracked
git fetch -p
# Will remove local branches that have already been merged
git branch --merged | grep -v "\*" | xargs -n 1 git branch -d