Skip to content

Instantly share code, notes, and snippets.

@shortjared
shortjared / list.txt
Last active May 6, 2024 17:16
List of AWS Service Principals
a4b.amazonaws.com
access-analyzer.amazonaws.com
account.amazonaws.com
acm-pca.amazonaws.com
acm.amazonaws.com
airflow-env.amazonaws.com
airflow.amazonaws.com
alexa-appkit.amazon.com
alexa-connectedhome.amazon.com
amazonmq.amazonaws.com
@benigumocom
benigumocom / build.gradle.kts
Last active May 6, 2024 17:15
Dagget-Hilt + KSP
// Project
plugins {
alias(libs.plugins.ksp) apply false
alias(libs.plugins.hilt) apply false
}
// Module
plugins {
alias(libs.plugins.ksp)
alias(libs.plugins.hilt)
@hgomez
hgomez / keychronk3-wayland.md
Last active May 6, 2024 17:14
How to configure Keychron K3 to get <> keys in Wayland

Keychron K3

I recently acquired a Keychron K3 and decided to switch to a macOS French keyboard layout so I could maintain my macOS habits while using Linux.

IMG_20240506_103148

All keys work except for the < and > keys.

IMG_20240506_142543

@X3msnake
X3msnake / _witbox_klipper_readme.md
Last active May 6, 2024 17:13
Witbox2 --> Klipper + Hotbed DIY upgrade attempt

Klipper Configuration for BQ WITBOX 2 by X3msnake

@imolorhe
imolorhe / pdf2img.html
Created August 13, 2018 09:38 — forked from jdeng/pdf2img.html
pdf to image using pdf.js
<html>
<body>
<script type="text/javascript" src="//mozilla.github.io/pdf.js/build/pdf.js"></script>
<script type="text/javascript">
var url = "https://docs.google.com/document/export?format=pdf&id=1ML11ZyyMpnAr6clIAwWrXD53pQgNR-DppMYwt9XvE6s&token=AC4w5Vg7fSWH1Hq0SgNckx4YCvnGPaScyw%3A1423618416864";
var pages = [], heights = [], width = 0, height = 0, currentPage = 1;
var scale = 1.5;
function draw() {
@jaskiratr
jaskiratr / chmod-400.cmd
Created June 29, 2018 01:03
Set permission of file equivalent to chmod 400 on Windows.
# Source: https://stackoverflow.com/a/43317244
$path = ".\aws-ec2-key.pem"
# Reset to remove explict permissions
icacls.exe $path /reset
# Give current user explicit read-permission
icacls.exe $path /GRANT:R "$($env:USERNAME):(R)"
# Disable inheritance and remove inherited permissions
icacls.exe $path /inheritance:r
# This supports merging as many adapters as you want.
# python merge_adapters.py --base_model_name_or_path <base_model> --peft_model_paths <adapter1> <adapter2> <adapter3> --output_dir <merged_model>
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
import torch
import os
import argparse
@eyeseast
eyeseast / python.md
Last active May 6, 2024 17:11
How to set up Python in 2022

I have an updated version of this on my blog here: https://chrisamico.com/blog/2023-01-14/python-setup/.

Python

This is my recommended Python setup, as of Fall 2022. The Python landscape can be a confusing mess of overlapping tools that sometimes don't work well together. This is an effort to standardize our approach and environments.

Tools and helpful links:

  • Python docs: https://docs.python.org/3/
  • Python Standard Library:  - Start here when you're trying to solve a specific problem
@yezz123
yezz123 / Exploitation.md
Created May 24, 2021 12:09
Pentesting-Exploitation