Skip to content

Instantly share code, notes, and snippets.

@valentinbeggi
valentinbeggi / serverless-esbuild.patch
Created February 10, 2023 15:47
serverless-esbuild-patch
diff --git a/dist/pack.js b/dist/pack.js
index 4582cb1ad12e8eb67843e8268674680d886feaa5..394fb9d743777d1003d4e8f53b765807cd729cfe 100644
--- a/dist/pack.js
+++ b/dist/pack.js
@@ -65,10 +65,10 @@ const filterFilesForZipPackage = ({ files, functionAlias, includedFiles, exclude
// if no externals is set or if the provider is google, we do not need any files from node_modules
if (!hasExternals || isGoogleProvider)
return false;
- if (
- // this is needed for dependencies that maps to a path (like scoped ones)
@ScriptAutomate
ScriptAutomate / Install-WSLAndUbuntu.ps1
Last active January 18, 2024 11:56
Enable WSL and Install Ubuntu 22.04 (or 20.04)
<#
- BIOS of host machine also needs to be configured to allow hardware virtualization
- Windows 10 Pro or otherwise is needed; Windows 10 Home Edition CANNOT get WSL
- This gist WSLv2, but can use WSLv1 instead. I needed v1 as I run Windows 10 in a VM in Virtualbox.
- WSLv2 has been giving me problems in Virtualbox 6.1, but WSLv1 works properly.
- vbox has issues with the GUI settings when it comes to nested virtualization on certain systems,
so run the following if needing to give a VM this enabled setting:
VBoxManage modifyvm <vm-name> --nested-hw-virt on
#>
package main
import (
"encoding/csv"
"encoding/json"
"io/ioutil"
"os"
)
type Instance struct {
@jaredcatkinson
jaredcatkinson / Get-InjectedThread.ps1
Last active March 1, 2024 03:05
Code from "Taking Hunting to the Next Level: Hunting in Memory" presentation at SANS Threat Hunting Summit 2017 by Jared Atkinson and Joe Desimone
function Get-InjectedThread
{
<#
.SYNOPSIS
Looks for threads that were created as a result of code injection.
.DESCRIPTION
@jfriv
jfriv / prod-rds-snap-restore-to-dev-temp.sh
Created August 16, 2016 20:03
RDS manual snapshot and restore script
#!/bin/bash
# set up some variables
NOW_DATE=$(date '+%Y-%m-%d-%H-%M')
RESTORE_FROM_INSTANCE_ID=<source name>
TARGET_INSTANCE_ID=<target name>
TARGET_INSTANCE_CLASS=db.m4.large
VPC_ID=<vpc subnet id>
NEW_MASTER_PASS=<root password>