Skip to content

Instantly share code, notes, and snippets.

View salekseev's full-sized avatar

Stas Alekseev salekseev

View GitHub Profile
@yifanzz
yifanzz / code-editor-rules.md
Created December 17, 2024 00:01
EP12 - The One File to Rule Them All

[Project Name]

Every time you choose to apply a rule(s), explicitly state the rule(s) in the output. You can abbreviate the rule description to a single word or phrase.

Project Context

[Brief description ]

  • [more description]
  • [more description]
  • [more description]
@Jip-Hop
Jip-Hop / truenas_scale_sysext_example.sh
Last active January 29, 2025 02:07
Temporarily extend available packages in TrueNAS SCALE using systemd-sysext. For educational purposes. Use at your own risk!
#!/usr/bin/env bash
# Specify destination for extension rootfs
ROOTFS_PATH=/mnt/tank/some/dataset/ext/rootfs
# List of packages to install
PACKAGES="usbutils"
# Download minimal debian base rootfs
mkdir -p "$ROOTFS_PATH"
curl -L https://github.com/debuerreotype/docker-debian-artifacts/raw/dist-amd64/bookworm/slim/rootfs.tar.xz | tar -xJ -C "$ROOTFS_PATH" --numeric-owner
@L422Y
L422Y / Mass cancel Amazon Subscribe and Save.md
Last active April 30, 2025 18:45
Mass cancel Amazon Subscribe and Save
  1. Open your subscriptions page:
https://www.amazon.com/auto-deliveries/subscriptionList?shipId=mpkmmwlssrkq&ref_=mys_nav_op_D
  1. Paste into devtools console
  2. Wait a few moments, and then refresh/repeat for any additional pages
  3. Confirm by checking to see if you've received cancellation emails
@Francesco149
Francesco149 / set-up-xcodegen-signing-personal-team.md
Last active May 2, 2025 00:01
how to set up iOS code signing with a personal free provisioning team with xcodegen

I recently wrestled with the clusterfuck that is iOS code signing, so here's my setup to set up a swift xcodegen project signed with a personal (free) provisioning team. this doesn't require an apple developer account, just a regular apple id.

you'll be able to build whole thing from the command line without ever have to touch xcode ever again.

this was tested with xcode 10.0 (10A255) on High Sierra

@HQJaTu
HQJaTu / ipmi-updater.py
Last active May 24, 2025 09:10
Supermicro IPMI certificate updater
#!/usr/bin/env python3
# vim: autoindent tabstop=4 shiftwidth=4 expandtab softtabstop=4 filetype=python
# This file is part of Supermicro IPMI certificate updater.
# Supermicro IPMI certificate updater is free software: you can
# redistribute it and/or modify it under the terms of the GNU General Public
# License as published by the Free Software Foundation, version 2.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
@flowchartsman
flowchartsman / kali_osx_persistence_wifi.md
Last active May 30, 2024 06:53 — forked from widdowquinn/kali_osx_persistence_wifi.md
Kali Linux Live USB with encrypted persistence and wireless on Macbook Pro/Air without networking.

Kali Linux Bootable USB with Persistence and Wireless on OSX

Tutorials for running live Kali on OSX often require you have networking on your laptop to apt install the drivers, but without an ethernet adapter you're not going to be able to do that, so this tutorial will cover a method of doing this manually, using another thumbdrive or external data source.

Download the appropriate Kali Linux .iso

I used a 64 bit .iso image, downloaded via HTTP.

Installation

  1. Spin up an AWS/Azure/GCP machine (Ubuntu - 16.04)
    • ensure you know how to use the web-interface of these IaaS to open ports for an instance
    • open ports 80, 443, 8000, 8888
  2. Follow this link
  3. Create a dir (.jupyterhub) which shall contain jupyterhub specific files
    • mkdir .jupyterhub
    • cd .jupyterhub
    • jupyterhub --generate-config
    • openssl rand -hex 8 > jupyterhub_cookie_secret
@fiunchinho
fiunchinho / credentials.py
Created March 17, 2016 12:06
Python script to fetch AWS access key and secret key from a running EC2 instance
from botocore.credentials import InstanceMetadataProvider, InstanceMetadataFetcher
provider = InstanceMetadataProvider(iam_role_fetcher=InstanceMetadataFetcher(timeout=1000, num_attempts=2))
credentials = provider.load()
access_key = credentials.access_key
secret_key = credentials.secret_key
print access_key
print secret_key
#!/bin/vbash
# CONFIG
wan=dhcp
lan=192.168.1.1
lan_segment=192.168.1.0
vpn_segment=192.168.5.0
domain=apertoire.org
lease_start=192.168.1.200
lease_stop=192.168.1.245
@ake-persson
ake-persson / gist:ca29cca70f0b458aee4d
Last active January 28, 2022 17:43
Homebrew Formula for a Go app

Homebrew Formula for a Go app

These are quick notes from making my own Formula and Tap.

Add go build script to your Git repo

gobuild.sh

#!/bin/bash