Skip to content

Instantly share code, notes, and snippets.

@bondarenkod
bondarenkod / git-windows-ssh.md
Last active May 2, 2024 18:26
Git SSH: Permission denied (publickey). fatal: Could not read from remote repository.

If you encounter the following error on Windows: Permission denied (publickey). fatal: Could not read from remote repository. But at the same time, the command ssh -vT git@github.com gives you this message: Hi USER_NAME! You've successfully authenticated, but GitHub does not provide shell access.

  • Add to your environment variables: GIT_SSH_COMMAND="C:/Windows/System32/OpenSSH/ssh.exe". Ensure there's no space after the equal sign. Also, verify that the path is correct for your OS.
  • Alternatively, change the Git configuration by running: git config --global core.sshCommand C:/Windows/System32/OpenSSH/ssh.exe
@rahularity
rahularity / work-with-multiple-github-accounts.md
Last active May 2, 2024 18:26
How To Work With Multiple Github Accounts on your PC

How To Work With Multiple Github Accounts on a single Machine

Let suppose I have two github accounts, https://github.com/rahul-office and https://github.com/rahul-personal. Now i want to setup my mac to easily talk to both the github accounts.

NOTE: This logic can be extended to more than two accounts also. :)

The setup can be done in 5 easy steps:

Steps:

  • Step 1 : Create SSH keys for all accounts
  • Step 2 : Add SSH keys to SSH Agent
git clone https://github.com/OpenDevin/OpenDevin.git
cd OpenDevin
conda create -n od python=3.10
conda activate od
docker ps
(optional) install docker if not already installed
docker pull ghcr.io/opendevin/sandbox
export OPENAI_API_KEY={your key}
(optional I had to install rust) curl --proto '=https' --tlsv1.2 -sSf [https://sh.rustup.rs](https://sh.rustup.rs/) | sh
(optional) restart terminal
@chaodonghu
chaodonghu / follow-instagram.js
Last active May 2, 2024 18:22
Google Chrome script that allows user to mass follow instagram users on another's profile
// Run GOOGLE CHROME - WORKING AS OF DEC 26 2023
// Please @ me in the comments if this stops working, I will try to get it working again within the month
// INSTRUCTIONS
// 1. Open Instagram in Chrome
// 2. Click on "FOLLOWERS" OR "FOLLOWING" on your Instagram profile or a desired user's Instagram profile
// 3. Open developer tools by right clicking on the page and clicking "INSPECT"
// 4. Copy the code below and paste in the developer tools console and press enter to run
// 5. Script will not run if tab is navigated away from, minimized of unfocused (It is recommended to open a new chrome window or push tab to the side and let script run in background)
package br.com.clairton.validator;
import java.util.InputMismatchException;
import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;
import br.com.clairton.annotation.CpfCnpj;
/**
@nicolasdao
nicolasdao / open_source_licenses.md
Last active May 2, 2024 18:16
What you need to know to choose an open source license.
@wouterdebie
wouterdebie / comfyui_macos.sh
Last active May 2, 2024 18:15
ComfyUI MacOS Apple Silicon install
#!/bin/bash
set -e
brew install llvm libomp python@3.11
export CC=$(brew ls --verbose llvm | grep -e 'bin/clang$')
export CXX=$(brew ls --verbose llvm | grep -e 'bin/clang++$')
git clone https://github.com/comfyanonymous/ComfyUI.git
cd ComfyUI
python3.11 -m venv venv
@senseisimple
senseisimple / comment-36.md
Last active May 2, 2024 18:12
dbm to percent conversion - quadratic

In Response to comment: https://www.intuitibits.com/2016/03/23/dbm-to-percent-conversion/#comment-9 regarding the quadratic formula used by WiFi Explorer (based on ipw2200 driver logic) for which a dBm to Percent table is provided.

https://github.com/torvalds/linux/blob/9ff9b0d392ea08090cd1780fb196f36dbb586529/drivers/net/wireless/intel/ipw2x00/ipw2200.c#L4321

Some quick PHP based on the ipw2200 code and a table generating function:

function signal_quality_perc_quad($rssi, $perfect_rssi=-20, $worst_rssi=-85) {
$nominal_rssi=($perfect_rssi – $worst_rssi);
@kizzx2
kizzx2 / docker-compose.yml
Last active May 2, 2024 18:10
Restart a docker container periodically with docker-compose
version: '3'
services:
app:
image: nginx:alpine
ports: ["80:80"]
restart: unless-stopped
restarter:
image: docker:cli
volumes: ["/var/run/docker.sock:/var/run/docker.sock"]
@octocat
octocat / .gitignore
Created February 27, 2014 19:38
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #