Skip to content

Instantly share code, notes, and snippets.

View zhiyue's full-sized avatar
🌻
just do it.

zhiyue zhiyue

🌻
just do it.
View GitHub Profile
@a1994sc
a1994sc / cloudflared.yaml
Created November 9, 2021 03:13
cloudflared - k3s
---
apiVersion: apps/v1
#kind: Deployment
kind: DaemonSet
metadata:
name: cloudflared
namespace: ingress
labels:
group: cloudflare
spec:
@version-control
version-control / Enable UDP RDP Windows
Last active February 2, 2023 13:32
Enable UDP RDP Windows
Admin Priv
VM / Remote Machine
Enable-NetFirewallRule -DisplayName "Remote Desktop - User Mode (TCP-In)"
Enable-NetFirewallRule -DisplayName "Remote Desktop - User Mode (UDP-In)"
Laptop - Local Remote User
Set-ItemProperty 'HKLM:/Software/Policies/Microsoft/Windows NT/Terminal Services/Client' 'fClientDisableUDP' 0
@sxiii
sxiii / resize-sdcard-partitions.md
Last active February 3, 2025 04:54
Resize linux partition that was written by DD or similar instrument to use all available space

Please run the following commands to resize a partition.
IMPORTANT NOTE: Don't forget to change partition address from /dev/sdb2 to your actual partition!
CHANGES ARE DONE IN TWO OR THREE PLACES.
Example below are for /dev/sdb2 partition which is called like "/dev/sdb 2" for growpart
and like "/dev/sdb2" for resize2fs & e2fsck.
Requirements: * growpart; * resize2fs; * e2fsck if disk requires checking.
Install growpart in arch/manjaro: pikaur -S growpart (resize2fs and e2fsck are usually bundled with OS)

sudo growpart /dev/sdb 2
@Innei
Innei / 📊 Weekly development breakdown
Last active October 31, 2025 00:31
Coding Language
TypeScript 36 hrs 10 mins ██████████████████▉░░ 90.4%
Markdown 57 mins ▌░░░░░░░░░░░░░░░░░░░░ 2.4%
JSON 54 mins ▍░░░░░░░░░░░░░░░░░░░░ 2.3%
CSS 26 mins ▏░░░░░░░░░░░░░░░░░░░░ 1.1%
Other 23 mins ▏░░░░░░░░░░░░░░░░░░░░ 1.0%
@blanboom
blanboom / tmcleanup.md
Last active October 29, 2024 07:45 — forked from linjer/tmcleanup.md
Script to automatically remote old Mac OSX Time Machine Backups older than a specified number of days

Prerequisites

  • gfind (via brew install findutils)
  • Time Machine drive mounted on your computer (or you can change path from standard /Volume/Time\ Machine\ Backups/Backups.backup.db/
  • Admin/sudo access in the OSX terminal

Script

  • Be sure to set the correct machine name. You can check the actual folder things are going into by looking in the backup location.
  • By default, it erases all backups older than 30 days. Adjust as desired.
@fanfare
fanfare / gist:d6539fa15ced86811313cb6fb1b0597e
Last active January 18, 2020 03:44
EMERGENCY STYLESHEET TO MAKE GOOGLE RESULTS LOOK LESS MESSED UP
/* warning not yet stable.. messed up on video results pages.. need to fix.. */
div.g .r a {
pointer-events:none
}
div.g a h3 {
pointer-events:all!important
}
div.g h3 {
transform:translateY(-22px) translateX(-1px);
@mrpeardotnet
mrpeardotnet / PVE-host-backup.md
Created December 17, 2019 18:03
Proxmox PVE Host Config Backup Script

Proxmox PVE Host Config Backup Script

This script can be used to backup essential configuration files from the Proxmox Virtual Enivronment (PVE) host.

The script will create backups using tar with specified backup prefix and date and time stamp in the file name. Script will also delete backups that are older then number of days specified.

Create backup script file

To create backup script that will be executed every day we can create backup script in /etc/cron.daily/ folder. We need to make it writeable by root (creator) only, but readable and executable by everyone:

touch /etc/cron.daily/pvehost-backup
////////////////////////////////////////////////////////////////////////////////
// This is an example of a proposed configuration language for restic,
// based on Hashpicorp's HCL.
//
// The main feature of the grammar in this example are:
//
// - More than one repository can be defined in a single configuration file.
// - Some aspects of the configuration (i.e. backends definitions) can be
// shared by different repositories.
// - Support for multiple backends for a single repository.
@brunofbrito
brunofbrito / apps_install.sh
Last active December 15, 2024 23:17
Install my macOS apps with homebrew, cask and mas-cli
#!/bin/zsh
echo Time to install all apps at once!
read -p "Press any key to continue... " -n1 -s
echo '\n'
echo Installing Homebrew...
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
echo Installing Oh My Zsh...
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"