Skip to content

Instantly share code, notes, and snippets.

View sainf's full-sized avatar

Carlos Nogueira sainf

View GitHub Profile
@sainf
sainf / rebuild_font_cache.bat
Created September 12, 2023 11:39 — forked from brainplot/rebuild_font_cache.bat
Rebuild font cache in Windows and reboot your computer in order to solve some font rendering issues
:: This script should be run in a priviledged command prompt
@echo off
echo This script is going to restart your computer.
echo Make sure to close all open applications in order not to lose any unsaved work.
choice /m "Do you want to continue"
if %errorlevel% NEQ "1" goto End
@sainf
sainf / updateAll.sh
Created October 25, 2022 12:39
Ubuntu Update atp, snap and flatpak
#!/bin/bash
if [ $(id -u) != 0 ]; then
printf "**********************************************\n"
printf "* Error: You must run this with sudo or root *\n"
printf "**********************************************\n"
exit 1
fi
apt upgrade
@sainf
sainf / aggregate.ts
Last active October 5, 2022 19:13
Use with feathers-mongo-aggregate easily
// more info https://github.com/sainf/feathers-mongodb-aggregate
//
// To use on all / before
//
// This adds the array to params.aggregate to find and get.
//
// Strips data starts with "_l_" (lowercase L) on update and patch, useful for clear keys like lookups
//
// Example
// aggregate([
@sainf
sainf / fireallBlockAll.bat
Last active October 7, 2021 11:40
Windows Firewall block all exe files in folder recursive
@echo off
@ setlocal enableextensions
@ cd /d "%~dp0"
echo.
echo This script file has to be copied to a folder that
echo contains the files you want to block on Windows Firewall.
echo It will block all .exe files in that folder and subfolders.
echo.
echo RUN IT AS ADMINISTRATOR
@sainf
sainf / reclaimWindows10.ps1
Last active September 11, 2021 08:40 — forked from alirobe/reclaimWindows10.ps1
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults). N.…
##########
# Tweaked Win10 Initial Setup Script
# Primary Author: Disassembler <disassembler@dasm.cz>
# Modified by: alirobe <alirobe@alirobe.com> based on my personal preferences.
# Version: 2.20.2, 2018-09-14
# Primary Author Source: https://github.com/Disassembler0/Win10-Initial-Setup-Script
# Tweaked Source: https://gist.github.com/alirobe/7f3b34ad89a159e6daa1/
# Tweak difference:
#
# @alirobe's version is a subset focused on safely disabling telemetry, some 'smart' features and 3rd party bloat ...
readFileAsync(file) {
return new Promise((resolve, reject) => {
let reader = new FileReader()
reader.onload = () => {
resolve(reader.result)
}
reader.onerror = reject
@sainf
sainf / jsPDF_line_wrap.md
Last active April 27, 2024 05:40 — forked from AnalyzePlatypus/jsPDF_line_wrap.md
Helper function for line-wrapping in jsPDF