Skip to content

Instantly share code, notes, and snippets.

@raymondpittman
raymondpittman / download_zip.js
Last active February 5, 2024 17:56
Native Javascript, automatically download a BLOB zip file using FETCH without the use of manual triggering clicking a DOM element. Will create a DOM element automatically and set the attribute HREF to a zip file or contents, then download file automatically on HTML file page load. Or also, will work through Node.js or another Fetch compatible Ja…
/*
* @Author Raymond Pittman
* @Github: https://github.com/raymondpittman
* @Note: Added README.md https://gist.github.com/raymondpittman/11cc82788422d1bddfaa62e60e5ec9aa
*/
/*
* @params
* @download: http://.zip
* @filename: ./downloaded.zip
@Ademking
Ademking / README.md
Created March 15, 2019 18:03
Compress folders (and exclude some folders) using Winrar CLI

To compress a folder using Winrar CLI

"%ProgramFiles%\WinRAR\Rar.exe" a -x*\FOLDER_TO_EXCLUDE "RESULT_NAME.rar" .\FOLDER_TO_INCLUDE

Example :

@ECHO off
SETLOCAL
@beeyev
beeyev / tweaks-win10.reg
Last active June 28, 2023 12:31
Windows 10 must have registry tweaks 2018
Windows Registry Editor Version 5.00
;Remove 'Give access to' Context Menu in Windows 10
[-HKEY_CLASSES_ROOT\*\shellex\ContextMenuHandlers\Sharing]
[-HKEY_CLASSES_ROOT\*\shellex\ContextMenuHandlers\ModernSharing]
[-HKEY_CLASSES_ROOT\Directory\Background\shellex\ContextMenuHandlers\Sharing]
[-HKEY_CLASSES_ROOT\Directory\shellex\ContextMenuHandlers\Sharing]
[-HKEY_CLASSES_ROOT\Directory\shellex\CopyHookHandlers\Sharing]
[-HKEY_CLASSES_ROOT\Directory\shellex\PropertySheetHandlers\Sharing]
[-HKEY_CLASSES_ROOT\Drive\shellex\ContextMenuHandlers\Sharing]
@alirobe
alirobe / reclaimWindows10.ps1
Last active June 26, 2024 17:02
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.…
###
###
### UPDATE: For Win 11, I recommend using this tool in place of this script:
### https://christitus.com/windows-tool/
### https://github.com/ChrisTitusTech/winutil
### https://www.youtube.com/watch?v=6UQZ5oQg8XA
### iwr -useb https://christitus.com/win | iex
###
###
@vankasteelj
vankasteelj / sec2time.js
Last active February 2, 2024 11:08
Javascript - Seconds to Time (hh:mm:ss,ms) -> sec2time(593.685038) becomes 00:09:53,685
function sec2time(timeInSeconds) {
var pad = function(num, size) { return ('000' + num).slice(size * -1); },
time = parseFloat(timeInSeconds).toFixed(3),
hours = Math.floor(time / 60 / 60),
minutes = Math.floor(time / 60) % 60,
seconds = Math.floor(time - minutes * 60),
milliseconds = time.slice(-3);
return pad(hours, 2) + ':' + pad(minutes, 2) + ':' + pad(seconds, 2) + ',' + pad(milliseconds, 3);
}
@aikchun
aikchun / imap-gmail
Last active June 12, 2024 11:41
IMAP PHP gmail attachment extractor
<?php
/**
*
* Gmail attachment extractor.
*
* Downloads attachments from Gmail and saves it to a file.
* Uses PHP IMAP extension, so make sure it is enabled in your php.ini,
* extension=php_imap.dll