Skip to content

Instantly share code, notes, and snippets.

@ChristopherA8
ChristopherA8 / hexdump.c
Last active April 27, 2024 05:23
Hexdump function
#include <stdio.h>
void hexdump(const void* data, size_t size) {
char ascii[17];
size_t i, j;
ascii[16] = '\0';
for (i = 0; i < size; ++i) {
printf("%02X ", ((unsigned char*)data)[i]);
if (((unsigned char*)data)[i] >= ' ' && ((unsigned char*)data)[i] <= '~') {
ascii[i % 16] = ((unsigned char*)data)[i];
@jndok
jndok / Makefile
Last active April 27, 2024 05:19
MachOMan - a basic Mach-O parsing library
all:
clang machoman.c -dynamiclib -o libmachoman.dylib
clean:
rm -rf libmachoman.dylib
@josemmo
josemmo / repair-mysql-data.ps1
Created August 28, 2020 18:48
Repair MySQL data directory (for XAMPP)
# Based on this answer: https://stackoverflow.com/a/61859561/1956278
# Backup old data
Rename-Item -Path "./data" -NewName "./data_old"
# Create new data directory
Copy-Item -Path "./backup" -Destination "./data" -Recurse
Remove-Item "./data/test" -Recurse
$dbPaths = Get-ChildItem -Path "./data_old" -Exclude ('mysql', 'performance_schema', 'phpmyadmin') -Recurse -Directory
Copy-Item -Path $dbPaths.FullName -Destination "./data" -Recurse
@kbauer
kbauer / Adblock Simple.js
Last active April 27, 2024 05:17
A simple adblocker bookmarklet, removing suspicious iframes. To install, copy-paste the source to a bookmark (will automatically remove newline characters). Extend the array ``exceptOrigins`` in order to create new exceptions. Careful: If bookmarklets get too long, they might stop working. This methods provides on-demand adblocking (as opposed t…
javascript:/* Adblock Simple */
(function(){
const exceptOrigins = [
'https://disqus.com',
document.origin
];
function remIF(e){
try{
var orgn = new URL(e.src || 'http://unknown-src').origin;
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active April 27, 2024 05:13
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@ztp99
ztp99 / gist:49bdc58acc03b2835390
Last active April 27, 2024 05:05
81-single-language-oem-iso
Windows 8.1 (Single Language) Generic Key Y9NXP-XT8MV-PT9TG-97CT3-9D6TC
http://answers.microsoft.com/en-us/windows/forum/windows_8-windows_install/how-to-download-windows-81-single-language-oem-iso/97e1231f-a6f4-4fa2-838e-e699ea59d5fa?auth=1
# Windows 8.1 : 334NH-RXG76-64THK-C7CKG-D3VPT
# Windows 8.1 Pro: XHQ8N-C3MCJ-RQXB6-WCHYG-C9WKB
изменение версии виндовз http://www.outsidethebox.ms/13319/
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion
@rxaviers
rxaviers / gist:7360908
Last active April 27, 2024 05:04
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@staab
staab / survey.md
Last active April 27, 2024 05:04
A survey of Nostr DM proposals

This is an attempt to take a step back and summarize all proposed approaches to private messages (DMs, group chats, and general-purpose nostr-within nostr, including for large groups of people) for the purpose of building a secure, feature-complete, interoperable solution.

This topic has come up repeatedly over nostr's history, and has entered the limelight again because of HRF's e2e encrypted group chats bounty. The hope here is to get everyone on the same page and hammer out one or more NIPs that can incorporate the best parts of all proposed solutions so we can finally get secure messaging on nostr.

Please comment with thoughts, criticisms, missing proposals/implmentations, and I will update the gist as we go along.

Proposals Reference