Skip to content

Instantly share code, notes, and snippets.

@beauwilliams
beauwilliams / Vagrant-M1-Install.bash
Last active May 11, 2024 20:20
Run x86 VM's on Mac M1 arm using vagrant with qemu hypervisor
brew install vagrant qemu
#Due to dependency errors, we must install vbguest first..
vagrant plugin install vagrant-vbguest
vagrant plugin install vagrant-qemu
#cd to working dir you like to keep your vagrant files
cd ~/VM-and-containers/VagrantMachines/M1-vagrantfiles/ubuntu18-generic-64/
#Create a vagrant file
$EDITOR Vagrantfile
@karpathy
karpathy / min-char-rnn.py
Last active May 11, 2024 20:19
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
@JasonCanCode
JasonCanCode / NetworkLogger.swift
Last active May 11, 2024 20:19
Print out helpful information on network requests when debugging
import Foundation
#if DEBUG
/// Use this to print out helpful information on network requests when debugging.
/// The functions return strings so I can decide whether to use print statemens or custom breakpoints to log them.
public enum NetworkLogger {
static func cURLLog(request: URLRequest) -> String {
"\n🌎 \(request.cURL)\n"
@JasonCanCode
JasonCanCode / add_git_hooks.sh
Created January 21, 2021 17:28
Git commit hooks for running SwiftLint
#!/usr/bin/env bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
echo "Running from" $DIR
ln -s $DIR/pre-commit $DIR/../.git/hooks/pre-commit
@PurpleVibe32
PurpleVibe32 / vmwk17key-5000keys-unchecked.txt
Created February 21, 2023 19:28
5000k+ vmware workstation pro 17 (untested)
4U612-DN31H-MJEJ0-0V0Z4-978HD
5G44H-ACH50-0J4C9-1VC5P-CY0QD
JC000-8G047-MJDF1-0H3E6-8QR5F
JV2NU-0XL5N-0J4Q8-0T0E6-8GH56
JZ6E0-4R1E0-HJ1Q0-1R8NH-3AK28
0Z48K-4X29Q-MJE80-113GK-C7K3A
HF4H0-46K80-MJ8D9-1KAZP-CKK12
NY69H-2N05P-HJ170-1V1ZM-CG222
4C45A-D8J0H-HJ5T0-1T25H-92A76
0Z4H2-0WK9K-4JE10-0T9G6-9C8M4

4chan Audio WebM Guide

Download FFmpeg https://www.ffmpeg.org/download.html FFmpeg is a command line tool, which means there is no GUI. You are going to have to input commands via the keyboard instead of clicking the mouse.

Current Limitations for WebM files on 4chan are:

Maximum file size is 4096KB.

Maximum duration is 300 seconds.

@littlelailo
littlelailo / apollo.txt
Created September 27, 2019 12:04
Apple Bootrom Bug
This bug was also called moonshine in the beginning
Basically the following bug is present in all bootroms I have looked at:
1. When usb is started to get an image over dfu, dfu registers an interface to handle all the commands and allocates a buffer for input and output
2. if you send data to dfu the setup packet is handled by the main code which then calls out to the interface code
3. the interface code verifies that wLength is shorter than the input output buffer length and if that's the case it updates a pointer passed as an argument with a pointer to the input output buffer
4. it then returns wLength which is the length it wants to recieve into the buffer
5. the usb main code then updates a global var with the length and gets ready to recieve the data packages
6. if a data package is recieved it gets written to the input output buffer via the pointer which was passed as an argument and another global variable is used to keep track of how many bytes were recieved already
7. if all the data was recieved th
@nicostombros
nicostombros / data-table.tsx
Last active May 11, 2024 20:07
Shadcn UI implementation of DataTable and Pagination components working together
// same as your regular shadcn datatable implementation (which uses tanstack table)
// note that the shadcn datatable uses shadcn table for the ui. see https://ui.shadcn.com/docs/components/data-table
import {
ColumnFiltersState,
SortingState,
VisibilityState,
flexRender,
getCoreRowModel,
getFilteredRowModel,
@Eyakub
Eyakub / REAMDE.md
Last active May 11, 2024 20:05
A complete cheatsheet of README.md

Markdown Cheatsheet


Heading 1

Markup :  # Heading 1 #

-OR-

@PurpleVibe32
PurpleVibe32 / vmwk17key.txt
Last active May 11, 2024 20:05
Free VMware Workstation Pro 17 full license keys
Install VMWare Workstation PRO 17 (Read it right. PRO!)
Also, these keys might also work with VMWare Fusion 13 PRO. Just tested it.
Sub to me on youtube pls - PurpleVibe32
if you want more keys - call my bot on telegram. @purector_bot (THE BOT WONT REPLY ANYMORE) - Or: https://cdn.discordapp.com/attachments/1040615179894935645/1074016373228978277/keys.zip - the password in the zip is 102me.
---
This gist can get off at any time.
PLEASE, DONT COPY THIS. IF YOU FORK IT, DONT EDIT IT.
*If you have a problem comment and people will try to help you!
*No virus