Skip to content

Instantly share code, notes, and snippets.

View 0xWDG's full-sized avatar
💻
Hacking my way around

Wesley de Groot 0xWDG

💻
Hacking my way around
View GitHub Profile

Thank you for your interest in AuroraEditor. The purpose of this Contributor License Agreement is to clarify the intellectual property license granted with contributions of software from any person or entity (the "Contributor") to the owners of AuroraEditor. This license is for your protection as a Contributor of software to AuroraEditor and does not change your right to use your own contributions for any other purpose.

The owners of AuroraEditor are the copyright holders of AuroraEditor indicated in the license files distributed with the software.

You and the owners of AuroraEditor hereby accept and agree to the following terms and conditions:

Your "Contributions" means all of your past, present and future contributions of object code, source code and documentation to AuroraEditor, however submitted to AuroraEditor, excluding any submissions that are conspicuously marked or otherwise designated in writing by You as "Not a Contribution."

You hereby grant to the owners of AuroraEditor a non-exclusive, irre

@0xWDG
0xWDG / aurora.markdown
Created September 1, 2022 09:42
Aurora
@0xWDG
0xWDG / LayoutThatFits.swift
Created June 9, 2022 09:00 — forked from ryanlintott/LayoutThatFits.swift
An alternative to ViewThatFits
//
// LayoutThatFits.swift
// WWDC22Experiments
//
// Created by Ryan Lintott on 2022-06-08.
//
import SwiftUI
struct LayoutThatFits: Layout {
@0xWDG
0xWDG / SecureLabel.swift
Created April 16, 2022 09:46 — forked from damian-rzeszot/SecureLabel.swift
_UITextLayoutCanvasView
import UIKit
lazy var hiddenView: UIView = {
let hiddenView: UIView
// iOS 14.1 -> _UITextFieldCanvasView
// iOS 15.0 -> _UITextLayoutCanvasView
if let klass = NSClassFromString("_UITextFieldCanvasView") as? UIView.Type {
hiddenView = klass.init()
@0xWDG
0xWDG / SwiftUI_v1.swift
Created October 10, 2021 18:58
SwiftUI Binding
//
// ContentView.swift
// SwiftUITest
//
import SwiftUI
class ClassWithVariables {
var intVar: Int
var strVar: String
@0xWDG
0xWDG / Swizzle.md
Created April 1, 2020 12:55
Swizzle

Swizzle 1 works (somehow)

The login() function is in the extension The fakeLogin() function is in the main class

Swizzle 2 does not work as expected

The login() function is in the main class The fakeLogin() function is in the extension

Swizzle 3 does work as expected

The dynamic login() function is in the main class

@0xWDG
0xWDG / pdf_flatedecode.py
Created April 30, 2019 09:51 — forked from averagesecurityguy/pdf_flatedecode.py
Decompress FlateDecode Objects in PDF
#!/bin/bash
import re
import zlib
pdf = open("some_doc.pdf", "rb").read()
stream = re.compile(r'.*?FlateDecode.*?stream(.*?)endstream', re.S)
for s in stream.findall(pdf):
s = s.strip('\r\n')
try:
import Foundation
import UIKit
// Extend UIView
extension UIView {
/// Setup a struct for saving the gesture handlers
struct gestureHandler {
/// Gesture "Up"
static var up: (()->())? = nil
/// Gesture "Down"
@0xWDG
0xWDG / sendPush.txt
Created November 21, 2018 14:55 — forked from valfer/sendPush.txt
Sending Push Notification with HTTP2 (and PHP) see entire post at: http://coding.tabasoft.it/ios/sending-push-notification-with-http2-and-php/
<?php
/**
* @param $http2ch the curl connection
* @param $http2_server the Apple server url
* @param $apple_cert the path to the certificate
* @param $app_bundle_id the app bundle id
* @param $message the payload to send (JSON)
* @param $token the token of the device
* @return mixed the status code (see https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/APNsProviderAPI.html#//apple_ref/doc/uid/TP40008194-CH101-SW18)
@0xWDG
0xWDG / DiCo.json
Last active November 2, 2018 13:49
DiCo.json
[{"ProfileName":"Wesley de Groot","ProfileImage":"https:\/\/scontent-ams3-1.xx.fbcdn.net\/v\/t1.0-9\/12540553_10200993236990571_1563581579900729933_n.jpg?_nc_cat=109&oh=1c6883e396a2111024c50f717ab3b6c1&oe=5C47D1EE","ProfileBio":"Hallo, ik ben Wesley \ud83d\ude03"},{"ProfileName":"Maike","ProfileImage":"https:\/\/scontent-ams3-1.xx.fbcdn.net\/v\/t1.0-9\/13529048_10153774785096365_8634972185709599875_n.jpg?_nc_cat=100&oh=426a8e849a1d37d0d3e847fbad41dd5b&oe=5C491061","ProfileBio":"Hallo, ik ben Maike :)"},{"ProfileName":"Mark","ProfileImage":"https:\/\/scontent-ams3-1.xx.fbcdn.net\/v\/t1.0-9\/22281683_10214013790916100_4143602397480062754_n.jpg?_nc_cat=108&oh=79ba66b75ce146233e813b2eeda9bc2b&oe=5C51AC9C","ProfileBio":"Hallo, ik........."},{"ProfileName":"Linda","ProfileImage":"https:\/\/proxy.duckduckgo.com\/iu\/?u=http%3A%2F%2Flindalimon.com%2Fwp-content%2Fthemes%2FEVA%2Fassets%2Fimg%2Flinda_logo_trans.png&f=1","ProfileBio":"Hallo, ik ben Linda!"},{"ProfileName":"God","ProfileImage":"https:\/\/proxy.duckduckgo.