Summary | How to control (or Understand) your GIST page's files list order. |
Notice | not official documentation. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# ssh-multi | |
# Modified to check if the script is started within a TMUX session to avoid starting in a background TMUX session | |
# H.SHUSTAK | |
# Origional : | |
# D.Kovalov : https://gist.github.com/dmytro/3984680 | |
# Based on http://linuxpixies.blogspot.jp/2011/06/tmux-copy-mode-and-how-to-control.html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# You know that really annoying message that pops up... | |
# Mosh: You have 3 detached Mosh sessions on this server, with PIDs: | |
# - mosh [2294539] | |
# - mosh [1874313] | |
# - mosh [2294805] | |
# I often find myself copying this list of PIDs in order to kill them manually |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git config --global color.ui true | |
git config --global user.name "YOUR NAME" | |
git config --global user.email "[email protected]" | |
git config --global credential.helper cache |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
"""Clone all gists of GitHub user with given username. | |
Clones all gist repos into the current directory, using the gist id as the | |
directory name. If the directory already exists as a git repo, try to perform a | |
'git pull' in it. | |
""" |
Disclaimer: I'm not the original author of this sheet, but can't recall where I found it. If you know the author, please let me know so I give the attribution.
Note: Since this seems to be helpful to some people, I formatted it to improve readability of the original. Also, note that this is from 2016, many things may have changed, and I don't use macOS anymore, so I probably can't help in case of questions, but maybe someone else can.
Mac Network Commands Cheat Sheet
After writing up the presentation for MacSysAdmin in Sweden, I decided to go ahead and throw these into a quick cheat sheet for anyone who’d like to have them all in one place. Good luck out there, and stay salty.
Get an ip address for en0:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo kextunload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport | |
sudo kextload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Script by rtrouton | |
# Cleanup by Arjen van Bochoven (oct 2013) | |
# Get major OS version (uses uname -r and bash substitution) | |
# osvers is 10 for 10.6, 11 for 10.7, 12 for 10.8, etc. | |
osversionlong=$(uname -r) | |
osvers=${osversionlong/.*/} | |
# Checks to see if the OS on the Mac is >= 10.7 |