Skip to content

Instantly share code, notes, and snippets.

https://massgrave.dev/
https://github.com/massgravel/Microsoft-Activation-Scripts
@haroldcris
haroldcris / gist:d80352120a00e06c16928c73f6701620
Created December 12, 2024 12:09
Install MC Minio Cli to NAS
ssh user@your_nas_ip
wget https://dl.min.io/client/mc/release/linux-amd64/mc
chmod +x mc
sudo mv mc /usr/local/bin/
mc --version
@haroldcris
haroldcris / gist:6b274b0c5ae5eb30f31c0f793e9a4aa7
Created July 31, 2024 21:53
docker-certbot DNS Manual Registration
command: >
certbot certonly
--keep-until-expiring --expand --manual
--preferred-challenges dns
--server https://acme-v02.api.letsencrypt.org/directory
--agree-tos --email ${CERTBOT_EMAIL}
-d ${FQDN}
@haroldcris
haroldcris / download-docker
Last active August 6, 2024 22:03
ubuntu docker
sudo snap install curl
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
#install vscode
sudo snap install --classic code
Location API
Cities, Town, PRovinces,
Address in Philippines
https://psgc.gitlab.io/api/
@haroldcris
haroldcris / ProxMox Post Install Script
Last active July 6, 2025 03:19
Install this script right after fresh install of ProxMox
# for 2025
bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/tools/pve/post-pve-install.sh)"
## old version
bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/post-pve-install.sh)"
@haroldcris
haroldcris / Minio Bucket Policy
Created April 16, 2023 08:58
Minio Policy to Allow public download but require access key when uploading
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"AWS": [
"*"
]
},
@haroldcris
haroldcris / gist:73cd224a47b18404ac5754510cfca1f6
Created November 22, 2022 09:44
MSSQL Script when Database Mail Failed
/***
Run this script when error is encountered setting up SQL Mail
**/
ALTER SERVICE MASTER KEY FORCE REGENERATE
@haroldcris
haroldcris / gist:966841d514c2596a6261ae78d4d99401
Last active December 16, 2024 14:30
MS Sql Recover from CheckDb Error
> To Check Run
DBCC CHECKDB ([DATABASENAME] ) WITH NO_INFOMSGS, ALL_ERRORMSGS, DATA_PURITY
> To Fix
ALTER DATABASE promis
SET SINGLE_USER WITH NO_WAIT
--WITH ROLLBACK IMMEDIATE;
GO
@haroldcris
haroldcris / gist:4267ae255dbd6a7c0c99e3b25a25984f
Created August 27, 2021 15:16
Get All Files in Google Drive
//Open GoogleSheet and Script
function list_all_files_inside_one_folder_without_subfolders(){
var sh = SpreadsheetApp.getActiveSheet();
var folder = DriveApp.getFolderById('1uF19N4LJzyt7sc_vz7h0Gs1B0k7VqdWP'); // I change the folder ID here
var list = [];
list.push(['Name','ID','Size']);
var files = folder.getFiles();
while (files.hasNext()){
file = files.next();