Skip to content

Instantly share code, notes, and snippets.

View haroldcris's full-sized avatar

Harold Cris haroldcris

View GitHub Profile
@haroldcris
haroldcris / download-docker
Last active October 1, 2023 05:48
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
Created April 16, 2023 09:26
Install this script right after fresh install of ProxMox
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 January 21, 2022 19:05
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 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();
@haroldcris
haroldcris / gist:5aeed0290d88453888b981e177f80a9b
Created July 25, 2021 13:21
Samba on Ubuntu 18.04 Password Problems
https://work-work.work/blog/2018/12/07/samba-windows-7.html
Or if you don't want to change your client settings, edit /etc/samba/smb.conf and add to the [global]section
lanman auth = no
ntlm auth = yes
restart samba and Windows 7 talks to your Ubuntu 18.04 server.
@haroldcris
haroldcris / How to signup for Github
Created April 19, 2021 12:43
Tips on signing up for Github
Goto http://github.com
@haroldcris
haroldcris / gist:6422f3de9cc14d8333044e917a2e91be
Created February 21, 2021 01:13
Restore Database without Log File
CREATE DATABASE MDF_FILE_NAME
ON (FILENAME = 'C: \Filepath\File_name.mdf')
FOR ATTACH_ REBUILD_LOG
GO