Skip to content

Instantly share code, notes, and snippets.

View networkextension's full-sized avatar

abigt networkextension

  • Star
View GitHub Profile
@networkextension
networkextension / arm64_sysregs_ios.py
Last active April 28, 2023 00:12 — forked from bazad/arm64_sysregs_ios.py
Label iOS arm64 system registers in IDA Pro, add S3_6_c15_c13/14/15 for T8101 icestorm
#
# arm64_sysregs_ios.py
# Brandon Azad
#
# Based on https://github.com/gdelugre/ida-arm-system-highlight by Guillaume Delugre.
#
import idautils
import idc
@networkextension
networkextension / ActivityRing2.swift
Last active June 24, 2021 03:46 — forked from labradon/ActivityRing2.swift
Final code for part 2 of the article on recreating the Apple Watch activity rings in SwiftUI. add Timer base Animation
/// Nested activity rings
struct ActivityRings: View {
var ringGap: CGFloat = 2
@State var progressMove: Double
@State var progressExercise: Double
@State var progressStand: Double
var body: some View {
ZStack{
@networkextension
networkextension / main.go
Created January 13, 2020 07:48 — forked from anujsinghwd/main.go
Upload File - golang
package main
import (
"crypto/md5"
"fmt"
"io"
"net/http"
"os"
"strconv"
"text/template"
@networkextension
networkextension / cross-compile-go-arm64.md
Created March 14, 2018 05:46 — forked from conoro/cross-compile-go-arm64.md
Cross-compiling Golang for ARM64 (aarch64) e.g. Pine64 on Fedora AMD64
  • Install Go for Linux the usual way on your main Linux box:
cd
wget https://storage.googleapis.com/golang/go1.6.2.linux-amd64.tar.gz
tar -zxvf go1.6.2.linux-amd64.tar.gz
sudo mv go /usr/local/
export GOROOT=/usr/local/go
mkdir -p ~/gitwork/go/src
mkdir ~/gitwork/go/bin
/*
* Copyright (c) 1999-2001,2005-2012 Apple Inc. All Rights Reserved.
*
* @APPLE_LICENSE_HEADER_START@
*
* This file contains Original Code and/or Modifications of Original Code
* as defined in and that are subject to the Apple Public Source License
* Version 2.0 (the 'License'). You may not use this file except in
* compliance with the License. Please obtain a copy of the License at
* http://www.opensource.apple.com/apsl/ and read it before using this
@networkextension
networkextension / wormdump.c
Created August 21, 2017 14:36 — forked from comex/wormdump.c
Some old broken code in case it helps anyone
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <sys/kern_event.h>
#include <stdio.h>
#include <stdint.h>
#include <stdbool.h>
#include <stdlib.h>
#include <assert.h>
#include <string.h>
#include <net/ethernet.h>
@networkextension
networkextension / HorizonDetection.m
Created June 12, 2017 01:47 — forked from Koze/HorizonDetection.m
Horizon Detection with Vision Framework
- (void)correctAngleWithImage:(UIImage *)image
{
VNImageRequestHandler *handler = [[VNImageRequestHandler alloc] initWithCGImage:image.CGImage options:@{}];
VNDetectHorizonRequest *request = [[VNDetectHorizonRequest alloc] initWithCompletionHandler:^(VNRequest * _Nonnull request, NSError * _Nullable error) {
if (error) {
NSLog(@"%@", error);
}
else {
NSAssert(request.results.count > 0, @"No Results");
@networkextension
networkextension / TextDetection.m
Created June 9, 2017 06:54 — forked from Koze/TextDetection.m
Text Detection with Vision Framework
- (void)detectWithImageURL:(NSURL *)URL
{
VNImageRequestHandler *handler = [[VNImageRequestHandler alloc] initWithURL:URL options:@{}];
VNDetectTextRectanglesRequest *request = [[VNDetectTextRectanglesRequest alloc] initWithCompletionHandler:^(VNRequest * _Nonnull request, NSError * _Nullable error) {
if (error) {
NSLog(@"%@", error);
}
else {
for (VNTextObservation *textObservation in request.results) {
// NSLog(@"%@", textObservation);
class Number /* class cluser */ {
class Int8: Number {
var value: Swift.Int8
init(_ value: Swift.Int8) { self.value = value }
}
class Int: Number {
var value: Swift.Int
init(_ value: Swift.Int) { self.value = value }
}
@networkextension
networkextension / StringExtensionHTML.swift
Last active November 9, 2017 20:25 — forked from mwaterfall/StringExtensionHTML.swift
Decoding HTML Entities in Swift3
//: [Previous](@previous)
import Foundation
var str = "Hello, playground"
import Foundation
// Very slightly adapted from http://stackoverflow.com/a/30141700/106244
// 99.99% Credit to Martin R!