Skip to content

Instantly share code, notes, and snippets.

@fuzyll
fuzyll / make_ghidra_app.sh
Last active December 4, 2023 21:09
Script to automatically create a MacOS Application Bundle out of a Ghidra release archive.
#!/usr/bin/env bash
# make_ghidra_app.sh | MacOS App Bundle Creator Script
#
# Copyright (c) 2019 Alexander Taylor <ajtaylor@fuzyll.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
@ole
ole / AsyncOperation.swift
Created August 19, 2018 16:47
An (NS)Operation subclass for async operations
import Foundation
/// An abstract class that makes building simple asynchronous operations easy.
/// Subclasses must override `main()` to perform any work and call `finish()`
/// when they are done. All `NSOperation` work will be handled automatically.
///
/// Source/Inspiration: https://stackoverflow.com/a/48104095/116862 and https://gist.github.com/calebd/93fa347397cec5f88233
open class AsyncOperation: Operation {
public init(name: String? = nil) {
super.init()
@SheldonWangRJT
SheldonWangRJT / WWDC18-416.md
Last active May 17, 2024 10:09
WWDC18 Notes by Sheldon - Session 416 - iOS Memory Deep Dive

WWDC18 Notes - Session 416 - iOS Memory Deep Dive

All session list link: Here
Session Link: Here
Demo starts @ 25:30 in the video.
Download session slides: Here

This notes is written by Sheldon after watching WWDC18 session 416. You can find me with #iOSBySheldon in Github, Youtube, Facebook, etc.

#include <stdatomic.h>
#include <stdint.h>
#include <stdbool.h>
/*!
An atomic ARC reference. Here's how it works:
The lowest bit of the pointer (mask 0x1) is used as a tag for the pointer being stored.
if the tag bit is set, that means that one thread currently owns this pointer, and will release it if the value has
been concurrently updated.
@amitaymolko
amitaymolko / HttpRequest.java
Last active August 15, 2020 01:53
Simple HttpURLConnection wrapper class
package com.amitaymolko.network;
import java.util.HashMap;
/**
* Created by amitaymolko on 2/16/16.
*/
public class HttpRequest {
@FiloSottile
FiloSottile / 32.asm
Last active August 12, 2024 16:24
NASM Hello World for x86 and x86_64 Intel Mac OS X (get yourself an updated nasm with brew)
; /usr/local/bin/nasm -f macho 32.asm && ld -macosx_version_min 10.7.0 -o 32 32.o && ./32
global start
section .text
start:
push dword msg.len
push dword msg
push dword 1
mov eax, 4