Skip to content

Instantly share code, notes, and snippets.

View abcarroll's full-sized avatar

A.B. Carroll III abcarroll

View GitHub Profile
@RealSGII2
RealSGII2 / ProgressRing.tsx
Created May 14, 2020 01:15
RSGUI-REACT progress ring component for ReactJS.
import * as React from 'react'
import styles from './index.module.css'
import classNames from 'classnames'
interface Props {
active?: boolean,
radius?: number,
width?: number,
style?: any,
color?: string
@jsorkin24
jsorkin24 / App.js
Created May 14, 2020 01:06
App.js
import React, { useState, useEffect } from 'react'
import logo from './logo.svg';
import './App.css';
import LoadingScreen from './loading'
function App() {
const [loading, setLoading] = useState(true)
useEffect(() => {
@stecman
stecman / dump-pyc-with-gdb.md
Last active March 25, 2024 09:20
Dumping all bytecode from a packaged Python application

This is a technique for extracting all imported modules from a packaged Python application as .pyc files, then decompiling them. The target program needs to be run from scratch, but no debugging symbols are necessary (assuming an unmodified build of Python is being used).

This was originally performed on 64-bit Linux with a Python 3.6 target. The Python scripts have since been updated to handle pyc files for Python 2.7 - 3.9.

Theory

In Python we can leverage the fact that any module import involving a .py* file will eventually arrive as ready-to-execute Python code object at this function:

PyObject* PyEval_EvalCode(PyObject *co, PyObject *globals, PyObject *locals);
@rjhansen
rjhansen / keyservers.md
Last active April 14, 2024 12:28
SKS Keyserver Network Under Attack

SKS Keyserver Network Under Attack

This work is released under a Creative Commons Attribution-NoDerivatives 4.0 International License.

Terminological Note

"OpenPGP" refers to the OpenPGP protocol, in much the same way that HTML refers to the protocol that specifies how to write a web page. "GnuPG", "SequoiaPGP", "OpenPGP.js", and others are implementations of the OpenPGP protocol in the same way that Mozilla Firefox, Google Chromium, and Microsoft Edge refer to software packages that process HTML data.

Who am I?

@huntrar
huntrar / full-disk-encryption-arch-uefi.md
Last active May 2, 2024 11:04
Arch Linux Full-Disk Encryption Installation Guide [Encrypted Boot, UEFI, NVMe, Evil Maid]

Arch Linux Full-Disk Encryption Installation Guide

This guide provides instructions for an Arch Linux installation featuring full-disk encryption via LVM on LUKS and an encrypted boot partition (GRUB) for UEFI systems.

Following the main installation are further instructions to harden against Evil Maid attacks via UEFI Secure Boot custom key enrollment and self-signed kernel and bootloader.

Preface

You will find most of this information pulled from the Arch Wiki and other resources linked thereof.

Note: The system was installed on an NVMe SSD, substitute /dev/nvme0nX with /dev/sdX or your device as needed.

<?php
/**
* This is small demonstration of PHPs signal handling behavior.
*
* Both methods will fork children using pcntl_fork and output whether or not forked parent/child were created inside
* of the registered sigHandler function, if it's the child or parent, and their respective PIDs.
*
* If you run spawnChildInsideHandler and attempt to send a SIGTERM (15) to either of the two processes
* you will receive no response. To exit you will have to force kill with SIGKILL (9)
@superboum
superboum / LICENCE.txt
Last active April 12, 2024 22:23
Install Debian with Debootstrap + Grub EFI
MIT LICENSE
Copyright 2018 Quentin Dufour
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR TH
@yogin
yogin / CryptoKitties.sol
Created January 28, 2018 19:06
CryptoKitties
// Copied from: https://ethfiddle.com/09YbyJRfiI
// CryptoKitties Source code
// Copied from: https://etherscan.io/address/0x06012c8cf97bead5deae237070f9587f8e7a266d#code
pragma solidity ^0.4.11;
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
@goetzc
goetzc / btrfs-subvolume-diff.sh
Created December 30, 2017 23:02
Show the difference between two btrfs subvolumes/snapshots
#!/bin/bash
#
# Author: http://serverfault.com/users/96883/artfulrobot
#
# This script will show most files that got modified or added.
# Renames and deletions will not be shown.
# Read limitations on:
# http://serverfault.com/questions/399894/does-btrfs-have-an-efficient-way-to-compare-snapshots
#
# btrfs send is the best way to do this long term, but as of kernel