Skip to content

Instantly share code, notes, and snippets.

View xshapira's full-sized avatar

Max Shapira xshapira

View GitHub Profile
@JoeyBurzynski
JoeyBurzynski / Homebrew_How-to-Backup-and-Restore-Homebrew-Packages-2022.md
Last active July 22, 2024 13:25
Homebrew: How to Backup & Restore Homebrew Packages [2022, MacOS]

Homebrew: How to Backup & Restore Homebrew Packages

Homebrew makes it easy to install and keep installed software up to date on your Mac - as part of my backup routine for my Mac I want to be able to run a single command to reinstall all packages.

If you're searching on how to backup & restore Homebrew, then I assume you're here for the commands.

Brewfiles

Brewfiles are files generated with definitions that Homebrew reads and processes, a generated

@tigerhawkvok
tigerhawkvok / poetry-convert.py
Last active June 24, 2024 16:38
Convert a requirements.txt file to a Poetry project
#!python3
"""
Convert a requirements.txt file to a Poetry project.
Just place in the root of your working directory and run!
"""
sourceFile = "./requirements.txt"
import re
import os
@bradtraversy
bradtraversy / eslint_prettier_airbnb.md
Created July 19, 2019 17:54
ESLint, Prettier & Airbnb Setup

VSCode - ESLint, Prettier & Airbnb Setup

1. Install ESLint & Prettier extensions for VSCode

Optional - Set format on save and any global prettier options

2. Install Packages

npm i -D eslint prettier eslint-plugin-prettier eslint-config-prettier eslint-plugin-node eslint-config-node
@oseme-techguy
oseme-techguy / Correct_GnuPG_Permission.sh
Last active June 9, 2024 07:46
This fixes the " gpg: WARNING: unsafe permissions on homedir '/home/path/to/user/.gnupg' " error while using Gnupg .
#!/usr/bin/env bash
# To fix the " gpg: WARNING: unsafe permissions on homedir '/home/path/to/user/.gnupg' " error
# Make sure that the .gnupg directory and its contents is accessibile by your user.
chown -R $(whoami) ~/.gnupg/
# Also correct the permissions and access rights on the directory
chmod 600 ~/.gnupg/*
chmod 700 ~/.gnupg
@sarthaksavvy
sarthaksavvy / cloudSettings
Last active June 25, 2024 14:23
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-09-04T18:49:47.910Z","extensionVersion":"v3.4.3"}
@ShawnClake
ShawnClake / docker.md
Last active July 6, 2021 06:50
Docker cheat sheet
@jacklorusso
jacklorusso / workbench.colorCustomizations.json
Last active December 19, 2023 07:40
A list of all Visual Studio Code customizable colors, grouped by UI region. Copy and paste into User Settings (comments are allowed) to tweak an existing theme or work on your own.
"workbench.colorCustomizations": {
// Contrast Colors - The contrast colors are typically only set for high contrast themes. If set, they add an additional border around items across the UI to increase the contrast.
"contrastActiveBorder": "",
"contrastBorder": "",
// Base Colors
"focusBorder": "",
"foreground": "",
"widget.shadow": "",
"selection.background": "",
"descriptionForeground": "",
@redlotus
redlotus / docstrings.py
Created October 2, 2017 04:34
Google Style Python Docstrings
# -*- coding: utf-8 -*-
"""Example Google style docstrings.
This module demonstrates documentation as specified by the `Google Python
Style Guide`_. Docstrings may extend over multiple lines. Sections are created
with a section header and a colon followed by a block of indented text.
Example:
Examples can be given using either the ``Example`` or ``Examples``
sections. Sections support any reStructuredText formatting, including
@raghubetina
raghubetina / credentials.md
Last active April 23, 2021 00:48
Hiding your credentials from GitHub

Hiding your credentials from GitHub

In many cases, we need to use secret information in our Ruby; most commonly, API keys and email account passwords.

You should never paste these strings directly into your Ruby code. There are bots that can and will steal your API keys the instant you push your code to a public GitHub repository. Even if you pay for private repositories, it's a good idea to not store secrets in your repo -- you may not want all of your collaborators (interns?) to know, for example, the API keys to your payment processor.

(If you have already pushed an API key to a public repository, you should sign into your API dashboard now and invalidate that old key, and get a new one. Assume that the old one has already been stolen. Reverting your commit will do no good.)

But if our Ruby needs to use these secrets, but we can't keep them in our code, what's the solution? Environment variables. We're going to use a gem called Figaro to make this easy.

@AdamMarsden
AdamMarsden / zshgit.md
Last active May 25, 2024 01:42
Oh My Zsh - Git Cheat Sheet

#Oh My Zsh - Git Cheat Sheet

ggit

gstgit status

glgit pull

gupgit pull --rebase