Skip to content

Instantly share code, notes, and snippets.

View Peoplecantfly's full-sized avatar

Nikolay Ivanov Peoplecantfly

View GitHub Profile

slow

This bash script offers quick shortcuts to simulate slower network connections. It is useful when you need to simulate a wireless network on a Linux network server, especially when you are using a virtual machine guest on your local machine or in the cloud.

slow 3G                   # Slow network on default eth0 down to 3G wireless speeds
slow 3G -l 600ms -p 10%   # slow network on eth0 and setup latency to 600ms packetloss to 10%
slow reset                # Reset connection for default eth0 to normal
slow vsat --latency=500ms # Simulate satellite internet  with a high latency

slow dsl -b 1mbps # Simulate DSL with a slower speed than the default

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

If you are getting a "Permission denied (publickey)." error when trying to push or clone your repo.

That what i do to store all my ssh keys in separate folders on windows.

  1. You need to create a ssh key. To do this run ssh-keygen -t rsa -C "your_email@example.com" command, when it promt for location - enter valid path to file where you whant to store them, like this: Enter file in which to save the key (/c/Users/nikol//.ssh/id_rsa): /d/Documents/SMTH/SSH/github/id_rsa. This will create both id_rsa and id_rsa.pub.
  2. Copy content of id_rsa.pub to your GitHub account ssh-keys settings.
  3. Check your HOME variable. In cmd run echo %HOME%. If there is no HOME path, just create it for current user. You need to create %HOME%\.ssh\config file, if .ssh folder does not exists - create it. Add to config file this lines (IdentityFile is the path where you store your id_rsa in first step.):
        Host github.com  
                Hostname github.com  
                User git