Skip to content

Instantly share code, notes, and snippets.

View ePirat's full-sized avatar

Marvin Scholz ePirat

View GitHub Profile
@MolecularMatters
MolecularMatters / main.cpp
Created July 26, 2022 10:10
VirtualAllocEx hang in Windows 10
#include <Windows.h>
#include <stdio.h>
#include <type_traits>
#include <algorithm>
namespace pointer
{
template <typename T>
#!/bin/bash
MINIDUMP_PATH="${1}"
MINIDUMP_STACKWALK=$(which minidump_stackwalk)
if [ -z "$MINIDUMP_STACKWALK" ]; then
if [ -f "$HOME/.mozbuild/minidump_stackwalk/minidump_stackwalk" ]; then
MINIDUMP_STACKWALK="$HOME/.mozbuild/minidump_stackwalk/minidump_stackwalk"
else
printf "You need the minidump_stackwalk executable in your PATH or under ~/.mozbuild in order to run this script\n"
exit 1
@steventroughtonsmith
steventroughtonsmith / MRDMenuView.h
Created March 1, 2020 17:21
Simplified iOS menu view wired up to UIMenuBuilder
//
// MRDMenuView.h
// MobileRadio
//
// Created by Steven Troughton-Smith on 29/02/2020.
// Copyright © 2020 High Caffeine Content. All rights reserved.
//
#import <UIKit/UIKit.h>
@Hakky54
Hakky54 / openssl_commands.md
Last active May 3, 2024 03:14 — forked from p3t3r67x0/openssl_commands.md
Some list of openssl commands for check and verify your keys

OpenSSL 🔐

Install

Install the OpenSSL on Debian based systems

sudo apt-get install openssl
@chockenberry
chockenberry / Debug.swift
Last active April 11, 2024 13:22
Debug and release logging in Swift that's reminiscent of NSLog()
//
// Debug.swift
//
// Created by Craig Hockenberry on 3/15/17.
// Updated by Craig Hockenberry on 2/20/24.
// Usage:
//
// SplineReticulationManager.swift:
//
@Akemi
Akemi / remote.swift
Created July 28, 2019 09:55
MPRemoteCommandCenter Test
// call like "swift remote.swift"
import MediaPlayer
let centre = MPRemoteCommandCenter.shared()
let handler: (String) -> ((MPRemoteCommandEvent) -> (MPRemoteCommandHandlerStatus)) = { (name) in
return { (event) -> MPRemoteCommandHandlerStatus in
print("\(name)")
return .success
}
@catlan
catlan / Document.m
Last active August 7, 2019 21:31
Pages.app like moveToURL:completionHandler: impl. NSIsRelatedItemType key in Info.plist is required
- (void)moveToURL:(NSURL *)url completionHandler:(void (^ __nullable)(NSError * __nullable))completionHandler
{
NSError *error = nil;
NSURL *adjustedURL = nil;
if (![[url pathExtension] isEqualToString:@"testextension"]) {
adjustedURL = [url URLByAppendingPathExtension:@"testextension"];
}
@Treeki
Treeki / odeus.py
Last active September 24, 2022 00:15
# runs under Python 2 (yes, I know...)
# required modules: pip install unicorn pefile
# this code is made available under the MIT license, as follows:
# Copyright (c) 2018 Ash Wolf
# 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
@JoshCheek
JoshCheek / uninstall_snap_camera_mac_osx.sh
Last active October 31, 2023 23:36
How to uninstall Snap Camera on Mac OS X
# these are reconstructed from a shell session without runnig them, so make
# sure you check that it's a sane thing to do before running it, I make no
# guarantees of fitness, and accept no liability. Run at your own risk.
sudo launchctl remove com.snap.SnapCameraRemover
rm -r ~/Library/Caches/Snap/
rm -r ~/Library/Caches/com.snap.SnapCamera/
rm -r ~/Library/Preferences/Snap/
rm ~/Library/Preferences/com.snap.SnapCamera.plist
rm ~/Library/Preferences/com.snap.Snap\ Camera.plist
sudo rm -rf /Applications/Snap\ Camera.app/
#!/bin/bash
ROOT=output
CC=x86_64-linux-musl-g++
CFLAGS="
-nostdinc
-isystem $ROOT/x86_64-linux-musl/include/c++/7.2.0
-isystem $ROOT/x86_64-linux-musl/include/c++/7.2.0/x86_64-linux-musl
-isystem $ROOT/x86_64-linux-musl/include/c++/7.2.0/backward
-isystem $ROOT/x86_64-linux-musl/include/