Skip to content

Instantly share code, notes, and snippets.

@demirdegerli
demirdegerli / ubuntu_debloater.sh
Last active April 25, 2024 18:04
Ubuntu Debloater
#!/bin/sh
if [ "$(whoami)" != "root" ]; then
echo "Please run this script as root."
exit
fi
printf "This script will\n\n- Remove Snap\n- Install the deb version of Firefox\n- Install Flatpak\n- Optionally replace Ubuntu Desktop with GNOME\n\n"
read -p "Continue? (Y/n) " start_prompt
case $start_prompt in
[nN] | [nN][oO] )
exit
@acarril
acarril / bootable-win-on-mac.md
Created November 18, 2022 17:49
Create a bootable Windows USB using macOS

For some reason, it is surprisingly hard to create a bootable Windows USB using macOS. These are my steps for doing so, which have worked for me in macOS Monterey (12.6.1) for Windows 10 and 11. After following these steps, you should have a bootable Windows USB drive.

1. Download a Windows disc image (i.e. ISO file)

You can download Windows 10 or Windows 11 directly from Microsoft.

2. Identify your USB drive

After plugging the drive to your machine, identify the name of the USB device using diskutil list, which should return an output like the one below. In my case, the correct disk name is disk2.

@tjeason
tjeason / usbManager.ps1
Last active April 25, 2024 18:00
Enable, disable, and return status of USB Drive access on Windows 10
<#
.SYNOPSIS
Enable or Disable access to Removable Storage
.DESCRIPTION
Powershell script to enable or disable access to Removable Storage.
Requires `Set-ExecutionPolicy -ExecutionPolicy RemoteSigned` before running.
.PARAMETER Status
@sergiecode
sergiecode / instalacion-react.md
Last active April 25, 2024 17:59
Instalaciones necesarias para curso ReactJS de Sergie Code
@juliandbt
juliandbt / Get-Restart.ps1
Created April 25, 2024 17:59 — forked from jdhitsolutions/Get-Restart.ps1
A PowerShell function and format file to query the event log using Get-WinEvent for restart related events.
Function Get-Restart {
[cmdletbinding()]
[outputtype("RestartEvent")]
Param(
[Parameter(Position = 0, ValueFromPipeline)]
[ValidateNotNullOrEmpty()]
[Alias("CN")]
[string]$Computername = $env:COMPUTERNAME,
[Parameter(HelpMessage = "Find restart events since this date and time.")]
[ValidateNotNullOrEmpty()]
@hugsy
hugsy / ProcessHollower.c
Created April 25, 2016 11:00
ProcessHollower: Hide a executable inside the runtime of another one
/**
*
* ProcessHollower: Hide a executable inside the runtime of another one
*
* Compile with
* C:> cl.exe ProcessHollower.c
*
* Execute with:
* C:> ProcessHollower.exe notepad.exe myevilbinary.exe
*
@jdhitsolutions
jdhitsolutions / Get-Restart.ps1
Created May 7, 2021 18:54
A PowerShell function and format file to query the event log using Get-WinEvent for restart related events.
Function Get-Restart {
[cmdletbinding()]
[outputtype("RestartEvent")]
Param(
[Parameter(Position = 0, ValueFromPipeline)]
[ValidateNotNullOrEmpty()]
[Alias("CN")]
[string]$Computername = $env:COMPUTERNAME,
[Parameter(HelpMessage = "Find restart events since this date and time.")]
[ValidateNotNullOrEmpty()]
@hegdepavankumar
hegdepavankumar / VMware-Workstation-Pro-17-Licence-Keys.txt
Last active April 25, 2024 18:03
VMware Workstation Pro 17 full license keys. Collected and sorted out thousands of universal License Keys for all major versions of VMware Workstation Pro 17. x versions.
VMware-Workstation-Pro-17-Licence-Keys
-------------------------------------------------------------------
VMware Workstation Pro 17 full license keys. Collected and sorted out thousands of universal License Keys for all major versions of VMware Workstation Pro 17. x versions.
Install VMWare Workstation PRO 17.x (Read it right. PRO!)
---
@srph
srph / stm.js
Last active April 25, 2024 17:54
js: standard time to military time
/**
* Standard Time to Military time
*
* @param {number} t Time to be converted
* @param {string} moridiem AM/PM
* @return {int}
*/
export default function stm (t, m) {
t = parseInt(t, 10);
const Pool = require('pg-pool');
const STATE = {
CANCELLED: 0,
ACTIVE: 1,
WAITING: 2,
}
export class ManagedPool extends Pool {
constructor (options) {