Skip to content

Instantly share code, notes, and snippets.

@kalaksi
kalaksi / rsync-rootfs.md
Last active July 19, 2024 03:15
Copy the whole root filesystem excluding pseudo-filesystems and mountpoints

Copying the whole linux root filesystem locally or remotely using rsync

Explanation of chosen options:

  • Verbose output with speed and progress information
  • Try to preserve all possible information: file attrs, hardlinks, ACLs and extended attrs,
  • Exclude contents of pseudo-filesystems and mountpoints
  • In this example source host is remote and destination local.
rsync --info=progress2  -vaHAX --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"} source.host:/ /local/destination
@adversinc
adversinc / primfeed-giveaway-helper.js
Last active July 19, 2024 03:13
PrimFeed Giveaway helper
/*
This helper is provided as-is and might steal your soul.
Use on your own risk!
This code WILL break as soon as PrimFeed gets updates.
Don't run the whole code. Pieces of code need different pages to run.
*/
// Step 0 - open PrimFeed and browser console:
// This script takes the user inputs from the Google Form, and will create a JIRA issue when the form is submitted via the REST API
// Takes user input info, and passes it into an event parameter "e"
// v1.1.0
function createIssue() {
const token = "get jira personal token";
const reporter = "get jira reporter id";
const projectKeyId = "get projectkey Id";
const projectKey = "get projectkey";
@rxaviers
rxaviers / gist:7360908
Last active July 19, 2024 03:09
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: πŸ˜„ :smile: πŸ˜† :laughing:
😊 :blush: πŸ˜ƒ :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
πŸ˜† :satisfied: 😁 :grin: πŸ˜‰ :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: πŸ˜€ :grinning:
πŸ˜— :kissing: πŸ˜™ :kissing_smiling_eyes: πŸ˜› :stuck_out_tongue:
@cabal95
cabal95 / vm-backup.sh
Created July 25, 2015 17:53
I use this script to backup my QEMU/KVM/libVirt virtual machines. The script requires KVM 2.1+ since it uses the live blockcommit mode. This means the data in the snapshot disk is rolled back into the original instead of the other way around. Script does NOT handle spaces in paths.
#!/bin/bash
#
BACKUPDEST="$1"
DOMAIN="$2"
MAXBACKUPS="$3"
if [ -z "$BACKUPDEST" -o -z "$DOMAIN" ]; then
echo "Usage: ./vm-backup <backup-folder> <domain> [max-backups]"
exit 1
i
me
my
myself
we
our
ours
ourselves
you
your
@estsaon
estsaon / wsl-port-forwarding.md
Last active July 19, 2024 03:06
How to SSH into WSL2 on an external Window

WSL:

  1. Install openssh-server:
sudo apt install openssh-server
  1. Add or uncomment following lines in /etc/ssh/sshd_config:
// per https://docs.npmjs.com/misc/scripts, npm exposes a bunch of variables to
// the environment prefixed with npm_config_*, npm_package_* and npm_lifecycle_*.
// Here's a list of all variables exposed in my setup.
npm_config_access=
npm_config_allow_same_version=
npm_config_also=
npm_config_always_auth=
npm_config_argv='{"remain":[],"cooked":["run","foo"],"original":["run","foo"]}'
npm_config_auth_type=legacy
{
"$schema": "https://biomejs.dev/schemas/1.7.1/schema.json",
"organizeImports": {
"enabled": true
},
"javascript": {
"formatter": {
"quoteStyle": "single"
}
},