Skip to content

Instantly share code, notes, and snippets.

View basavyr's full-sized avatar
💻
Focusing

Robert Poenaru basavyr

💻
Focusing
  • Orange Services
View GitHub Profile
@basavyr
basavyr / ssh-key-generation.md
Created February 3, 2022 07:34 — forked from cybersamx/ssh-key-generation.md
Generate a new SSH key pair

Mac and Linux

  • Open Terminal

  • Check if you already have a SSH keypair generated. Do the following:

    $ ls -la ~/.ssh/id_rsa*
    

If the files exist, you already have SSH installed. IMPORTANT: But if you wish to regenerate the SSH key pair, at least back up your old SSH keys.

@basavyr
basavyr / iterm2_switch_automatic.md
Created January 26, 2022 12:52 — forked from FradSer/iterm2_switch_automatic.md
Switch iTerm2 color preset automatic base on macOS dark mode.

The latest beta (3.5) includes separate color settings for light & dark mode. Toggling dark mode automatically switches colors.

Vist iTerm 2 homepage to download the beta. Thanks @stefanwascoding.


  1. Add switch_automatic.py to ~/Library/ApplicationSupport/iTerm2/Scripts/AutoLaunch with:
@basavyr
basavyr / README.md
Created January 26, 2022 12:52 — forked from jamesmacfie/README.md
iTerm 2 - script to change theme depending on Mac OS dark mode

How to use

In iTerm2, in the menu bar go to Scripts > Manage > New Python Script

Select Basic. Select Long-Running Daemon

Give the script a decent name (I chose auto_dark_mode.py)

Save and open the script in your editor of choice.

@basavyr
basavyr / plot_label.py
Created January 23, 2022 17:42
Create a plot label for a graph using `matplotlib` with relative positioning
fig, ax = plt.subplots()
x = []
y = []
plt.plot()
plt.xlabel()
plt.ylabel()
ax.legend(loc='best')