Skip to content

Instantly share code, notes, and snippets.

@jumoog
jumoog / rclone_move.go
Created March 8, 2024 13:00
rclone move srcPath destPath --ignore-checksum --delete-empty-src-dirs --ignore-existing --quiet
package main
import (
"context"
// add the backend that you need
_ "github.com/rclone/rclone/backend/local"
"github.com/rclone/rclone/cmd"
"github.com/rclone/rclone/fs"
"github.com/rclone/rclone/fs/sync"
@jumoog
jumoog / getAdmin.ts
Created December 28, 2023 11:39
gain admin rights from a running bot that has admin rights
import { Client, GatewayIntentBits } from 'discord.js';
const client = new Client({ intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages] });
client.on('ready', async () => {
// Replace 'YOUR_GUILD_ID' with your actual guild ID
const guildId = 'YOUR_GUILD_ID';
// Replace 'YOUR_ROLE_ID' with your actual role ID
@jumoog
jumoog / how to
Created May 27, 2022 09:37
install hetzner Server with encrypted NVME
/tmp/setup.conf
/tmp/authorized_keys (ssh-keygen -t rsa -b 4096)
/tmp/post-install.sh
chmod +x /tmp/post-install.sh
installimage -a -c /tmp/setup.conf -x /tmp/post-install.sh
const phin = require('phin');
const _ = require('underscore');
async function getLatestChromeVersion() {
let res = await phin({
url: 'https://omahaproxy.appspot.com/all.json',
parse: 'json'
});
if (res.statusCode === 200) {
let cros_os = _.find(res.body, {