Skip to content

Instantly share code, notes, and snippets.

@invictus-ir
invictus-ir / CloudTrail.csv
Last active May 2, 2024 12:56
An overview of CloudTrail events that are interesting from an Incident Response perspective
We can make this file beautiful and searchable if this error is corrected: It looks like row 8 should actually have 10 columns, instead of 9. in line 7.
"Initial Access","Execution","Persistence","Privilege Escalation","Defense Evasion","Credential Access","Discovery","Lateral Movement","Exfiltration","Impact"
ConsoleLogin,StartInstance,CreateAccessKey,CreateGroup,StopLogging,GetSecretValue,ListUsers,AssumeRole,CreateSnapShot,PutBucketVersioning
PasswordRecoveryRequested,StartInstances,CreateUser,CreateRole,DeleteTrail,GetPasswordData,ListRoles,SwitchRole,ModifySnapshotAttributes ,RunInstances
,Invoke,CreateNetworkAclEntry,UpdateAccessKey,UpdateTrail,RequestCertificate,ListIdentities,,ModifyImageAttribute,DeleteAccountPublicAccessBlock
,SendCommand,CreateRoute,PutGroupPolicy,PutEventSelectors,UpdateAssumeRolePolicy,ListAccessKeys,,SharedSnapshotCopyInitiated,
,,CreateLoginProfile,PutRolePolicy,DeleteFlowLogs,,ListServiceQuotas,,SharedSnapshotVolumeCreated,
,,AuthorizeSecurityGroupEgress,PutUserPolicy,DeleteDetector,,ListInstanceProfiles,,ModifyDBSnapshotAttribute,
,,AuthorizeSecurityGroupIngress,AddRoleToInstanceProfile,DeleteMembers,,ListBuckets,,PutBucketP
@dreikanter
dreikanter / encrypt_openssl.md
Last active May 2, 2024 12:55 — forked from crazybyte/encrypt_openssl.txt
File encryption using OpenSSL

Symmetic encryption

For symmetic encryption, you can use the following:

To encrypt:

openssl aes-256-cbc -salt -a -e -in plaintext.txt -out encrypted.txt

To decrypt:

@shuding
shuding / swr-suspense-journey.md
Created September 14, 2021 12:18
The Journey of SWR and Suspense

The Journey of SWR and Suspense

We are trying to combine the idea of SWR ("stale-while-revalidate") and React Suspense together, and this write-up covers all our findings from this journey.

Background

When React Hooks launched, people started to rely on useEffect to initiate data fetching:

function User () {
@yoki
yoki / html2markdown.py
Created May 23, 2016 05:19
Convert html file to markdown
def html2markdown(self, html):
# convert html to markdown.
# specification:
# remove all tag exccept tags listed in the cleanbody._repl
# when p/div tags are in the table tag, markdown converter (htmlformatter)
# confuses. so it is removed
# we need following in the header
# import re, html2text
# from bs4 import BeautifulSoup
# install_certifi.py
#
# sample script to install or update a set of default Root Certificates
# for the ssl module. Uses the certificates provided by the certifi package:
# https://pypi.python.org/pypi/certifi
import os
import os.path
import ssl
import stat
@ammuench
ammuench / 8BitDoUltimateWifi_Linux.MD
Last active May 2, 2024 12:48
8BitDo Ultimate 2.4GHz wifi working in linux
@11philip22
11philip22 / app.js
Last active May 2, 2024 12:47
Crack Monokai pro theme for Visual Studio Code or VSCodium
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("path"),require("child_process"),require("os"),require("fs")):"function"==typeof define&&define.amd?define(["path","child_process","os","fs"],t):"object"==typeof exports?exports["app"]=t(require("path"),require("child_process"),require("os"),require("fs")):e["app"]=t(e["path"],e["child_process"],e["os"],e["fs"])}(this,function(e,t,s,i){return(e=>{function t(i){if(s[i])return s[i].exports;var r=s[i]={i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var s={};return t.m=e,t.c=s,t.d=((e,s,i)=>{t.o(e,s)||Object.defineProperty(e,s,{configurable:!1,enumerable:!0,get:i})}),t.n=(e=>{var s=e&&e.__esModule?function(){return e["default"]}:function(){return e};return t.d(s,"a",s),s}),t.o=((e,t)=>Object.prototype.hasOwnProperty.call(e,t)),t.p="",t(t.s=1)})([(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={APP:{NAME:"MonokaiPro-VSCode",
THEMES:["Monokai Pro","Monokai Pro (F
@cedrickchee
cedrickchee / llama-7b-m1.md
Last active May 2, 2024 12:47
4 Steps in Running LLaMA-7B on a M1 MacBook with `llama.cpp`

4 Steps in Running LLaMA-7B on a M1 MacBook

The large language models usability

The problem with large language models is that you can’t run these locally on your laptop. Thanks to Georgi Gerganov and his llama.cpp project, it is now possible to run Meta’s LLaMA on a single computer without a dedicated GPU.

Running LLaMA

There are multiple steps involved in running LLaMA locally on a M1 Mac after downloading the model weights.

@kevin-smets
kevin-smets / iterm2-solarized.md
Last active May 2, 2024 12:46
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@MihailCosmin
MihailCosmin / cuda_11.8_installation_on_Ubuntu_22.04
Last active May 2, 2024 12:46 — forked from primus852/cuda_11.7_installation_on_Ubuntu_22.04
Instructions for CUDA v11.8 and cuDNN 8.7 installation on Ubuntu 22.04 for PyTorch 2.0.0
#!/bin/bash
### steps ####
# verify the system has a cuda-capable gpu
# download and install the nvidia cuda toolkit and cudnn
# setup environmental variables
# verify the installation
###
### to verify your gpu is cuda enable check