Skip to content

Instantly share code, notes, and snippets.

@esskayesss
esskayesss / hathitrust-downloader.sh
Created May 8, 2024 00:06
downloads full view books from hathitrust.org
#!/bin/bash
# utility functions
function rand_str() {
local length=${1:-8}
LC_ALL=C tr -dc A-Za-z0-9 </dev/urandom | head -c $length
}
function debug() {
@aroslov
aroslov / handleCorsForCloudFront.js
Created May 21, 2019 07:04
Handle CORS (OPTIONS request) in Edge Lambda for AWS CloudFront
function checkOrigin(origin) {
if (!origin) {
return false;
}
const [protocol, host, port] = origin.split(':');
// TODO: put your own logic here
if (!host) {
return false;
}
if (host === '//localhost') {
@chranderson
chranderson / nvmCommands.js
Last active May 8, 2024 00:04
Useful NVM commands
// check version
node -v || node --version
// list locally installed versions of node
nvm ls
// list remove available versions of node
nvm ls-remote
// install specific version of node
@0xdevalias
0xdevalias / bypassing-cloudflare-akamai-etc.md
Last active May 8, 2024 00:04
Some notes/resources for bypassing anti-bot/scraping features on Cloudflare, Akamai, etc.
@darconeous
darconeous / tesla-key-card-protocol.md
Last active May 7, 2024 23:59
Tesla Key Card Protocol

Tesla Key Card Protocol

Researched by Robert Quattlebaum darco@deepdarc.com.

Last updated 2020-02-03.

Image of Tesla Key Card Image of Tesla Model 3 Key Fob

@krisek
krisek / alert.rules.yml
Last active May 7, 2024 23:53
Prometheus alert rules for node exporter
groups:
- name: node_exporter_alerts
rules:
- alert: Node down
expr: up{job="monitoring-pi"} == 0
for: 2m
labels:
severity: warning
annotations:
title: Node {{ $labels.instance }} is down
@Vogtinator
Vogtinator / README.md
Last active May 7, 2024 23:48
Run Win11 on ARM in QEMU

When following this guide on a host not capable of native arm64 KVM, replace -M virt -cpu host -accel kvm with -M virt,virtualization=on -cpu max.

The reason for virtualization=on is that the Windows bootloader does an smc #0 PSCI call, but without EL2, QEMU's TCG does not handle those because PSCI is in HVC mode and such that instruction is treated as undefined. With KVM enabled, smc #0 is handled properly.

Workaround in QEMU for using TCG without virtualization=on:

diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index b871350856..de11ff51d1 100644
--- a/hw/arm/virt.c
@EXtremeExploit
EXtremeExploit / osuGuide.md
Last active May 7, 2024 23:46
Installation guide to installing osu! on Arch Linux

osu! Arch Linux guide install

Installing wine

  • Install wine from the official repositories, wine 7.12 is stable enough to run osu!
$ sudo pacman -S wine

Installing wine dependecies