Skip to content

Instantly share code, notes, and snippets.

View nathan-fiscaletti's full-sized avatar
🔨
Reinventing the wheel

Nathan Fiscaletti nathan-fiscaletti

🔨
Reinventing the wheel
View GitHub Profile
import sys
import re
import json
import os
from downloads import download_logs
from downloads import download_symbols
from macholib.MachO import MachO
from macholib.SymbolTable import SymbolTable
@nathan-fiscaletti
nathan-fiscaletti / String+Pointer.swift
Created December 27, 2020 18:34
An extension of Swifts String class that provides functions for generating several types of memory pointers. Includes a full test suite.
import Foundation
import XCTest
// myString.stackPointer() -> UnsafePointer<Int8>?:
// Returns a pointer to the memory allocated on the stack for this string.
//
// myString.mutableStackPointer() -> UnsafeMutablePointer<Int8>?
// Returns a mutable pointer to the memory allocated on the stack for this string.
//
// myString.withUnsignedStackPointer(closure)
@nathan-fiscaletti
nathan-fiscaletti / diff_list.sh
Last active February 14, 2020 00:15
Git Diff List - A tool for looking at git diffs without typing in long file paths
#!/bin/bash
## This script makes it so that you don't have to type
## long file paths into `git diff` anymore.
##
## Add this script anywhere on your system and then
## in your ~/.gitconfig add the following:
##
## [alias]
## diff-list = !/Full/Path/To/Script.sh
amazon_wish_list
aol_mail
balatarin
bibsonomy
bitty_browser
blinklist
blogger
blogmarks
bookmarks_fr
box_net
import UIKit
class ViewController: UIViewController {
let gridLocationsLock = DispatchSemaphore(value: 1)
var activeGridLocations:[CGPoint] = []
override func viewDidLoad() {
super.viewDidLoad()
package com.my.app;
import android.content.Context;
import android.graphics.Matrix;
import android.graphics.PointF;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
/**
* Class used to get detailed information about the size and position of an ImageView.
@nathan-fiscaletti
nathan-fiscaletti / Base.php
Last active October 12, 2019 17:36
A class for manipulating and creating custom numeric formatting
<?php
/**
* Class used for converting between bases
* and custom bases using digit libraries.
*
* @see https://me.nathanf.tk/2019/05/02/creating-a-custom-numeric-base-in-php/
*
* @author Nathan Fiscaletti
*/
class Base
@nathan-fiscaletti
nathan-fiscaletti / Reachability.java
Last active May 25, 2019 16:39
An Android class for retrieving network reachability
package my.app;
import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
public class Reachability
{
/**
* Connection Type Definitions.
@nathan-fiscaletti
nathan-fiscaletti / UIImageViewAdditions.swift
Created November 12, 2018 17:18
An extension for UIImageView that provides useful tools for handling the scaled size of the image, the padding added by the UIImageView and X/Y coordinate mapping.
//
// UIImageView Additions
//
// Created by Nathan Fiscaletti on 11/12/18.
// Copyright © 2018 Nathan Fiscaletti. All rights reserved.
//
// An extension for UIImageView that provides useful tools for
// handling the scaled size of the image, the padding added by
// the UIImageView and X/Y coordinate mapping.
//
@nathan-fiscaletti
nathan-fiscaletti / symbolicate.sh
Last active July 26, 2024 17:26
A tool for symbolicating iOS crash reports.
#!/bin/bash
CRASH=$1
APP=$2
ARCH=$3
OUTPUT=$4
# This script will fully symbolicate an iOS Crash Report
# Usage: ./symbolicate.sh mycrash.crash MyApp.app arch64 output.crash
#