Skip to content

Instantly share code, notes, and snippets.

@insdavm
insdavm / WireGuard-site-to-site.md
Last active May 2, 2024 20:10
Accessing a subnet that is behind a WireGuard client using a site-to-site setup

WireGuard Site-to-Site

Accessing a subnet that is behind a WireGuard client using a site-to-site setup

Problem Summary

We want to access a local subnet remotely, but it is behind a NAT firewall and we can't setup port forwarding. Outgoing connections work, but all incoming connections get DROPPED by the ISP's routing policy.

Solution Summary

@MaxXor
MaxXor / btrfs-guide.md
Last active May 2, 2024 20:08
Btrfs guide to set up an LUKS-encrypted btrfs raid volume with included maintenance & recovery guide

Encrypted Btrfs storage setup and maintenance guide

Initial setup with LUKS/dm-crypt

This exemplary initial setup uses two devices /dev/sdb and /dev/sdc but can be applied to any amount of devices by following the steps with additional devices.

Create keyfile:

dd bs=64 count=1 if=/dev/urandom of=/etc/cryptkey iflag=fullblock
chmod 600 /etc/cryptkey
@aessing
aessing / install-AzCopy.sh
Created October 1, 2020 19:50
Install AzCopy on Linux
#!/bin/bash
# =============================================================================
# Install AzCopy on Linux
# https://docs.microsoft.com/en-us/azure/storage/common/storage-use-azcopy-v10
# https://github.com/Azure/azure-storage-azcopy
# -----------------------------------------------------------------------------
# Developer.......: Andre Essing (https://www.andre-essing.de/)
# (https://github.com/aessing)
# (https://twitter.com/aessing)
# (https://www.linkedin.com/in/aessing/)
@choco-bot
choco-bot / Install.txt
Created May 2, 2024 19:58
nero-aac v1.5.4 - Failed - Package Tests Results
==> default: Running provisioner: shell...
[ERROR] An error occurred in the underlying SSH library that Vagrant uses.
[ERROR] The error message is shown below. In many cases, errors from this
[ERROR] library are caused by ssh-agent issues. Try disabling your SSH
[ERROR] agent or removing some keys and try again.
[ERROR] If the problem persists, please report a bug to the net-ssh project.
[ERROR] timeout during server version negotiating
@rahularity
rahularity / work-with-multiple-github-accounts.md
Last active May 2, 2024 19:56
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
@karpolan
karpolan / .prettierrc.js
Last active May 2, 2024 19:53
Prettier config for React App
module.exports = {
printWidth: 120, // max 120 chars in line, code is easy to read
useTabs: false, // use spaces instead of tabs
tabWidth: 2, // "visual width" of of the "tab"
trailingComma: 'es5', // add trailing commas in objects, arrays, etc.
semi: true, // add ; when needed
singleQuote: true, // '' for stings instead of ""
bracketSpacing: true, // import { some } ... instead of import {some} ...
arrowParens: 'always', // braces even for single param in arrow functions (a) => { }
jsxSingleQuote: false, // "" for react props, like in html
@thiagobraddock
thiagobraddock / _README.md
Last active May 2, 2024 19:51
setup vitest + testing library
  1. Instalação:
npm i vitest -D
npm i jsdom -D
npm i @testing-library/react @testing-library/jest-dom @testing-library/user-event -D
npm i @types/jest -D
  1. Acrescentar os scripts teste e coverage ao package.json:
@nikitakarpenkov
nikitakarpenkov / RSA.cls
Last active May 2, 2024 19:43 — forked from karmats/RsaEncryption.cls
RSA encryption / decryption in salesforce apex
public class RSA {
private Key key;
// Hex digits
private static final String DIGITS = '0123456789abcdef';
private static final Decimal HEX_BASE = 16;
public abstract class Key {
private String modulus;
public Key(String modulus) {
@sataniceypz
sataniceypz / alive.js
Last active May 2, 2024 19:42 — forked from Kingbadan321/alive.js
Custom Alive For Izumi-xd
const { command, isPrivate, getBuffer } = require("../lib/");
const config = require("../config");
// Edit here πŸ‘‡πŸΏπŸŒΈ
let title = "π—œπ—­π—¨π— π—œ-𝗫𝗗"
let body = "π—›π—²π˜† π—œπ˜‡π˜‚π—Ίπ—Ά π—Άπ˜€ π—”π—Ήπ—Άπ˜ƒπ—²πŸ§šβ€β™‚οΈ"
let sourceUrl = "github.com/sataniceypz/Izumi-v2"
let mediaUrl = "github.com/sataniceypz/Izumi-v2"
let mediaType = 1
@AkdM
AkdM / hideMyEmail.applescript
Last active May 2, 2024 19:33
Generate new "Hide My Email" email with iCloud+ using AppleScript
-- Kill System Preferences first if already open
if application "System Preferences" is running then
tell application "System Events"
set theID to unix id of processes whose name is "System Preferences"
try
do shell script "kill -9 " & theID
delay 0.1
end try
end tell
end if