Skip to content

Instantly share code, notes, and snippets.

View username0x0a's full-sized avatar
🐵
🙉 🙈 🙊

Michal Zelinka username0x0a

🐵
🙉 🙈 🙊
View GitHub Profile
@username0x0a
username0x0a / Swift5_String+Ex.swift
Last active November 22, 2020 17:57
Life-saving String extension for Swift >= 5.0 easing the split–filter–join flows.
import Foundation
#if swift(>=5.0)
extension StringProtocol where Index == String.Index {
func split(string str: String) -> [Substring] {
var si = self.startIndex
@username0x0a
username0x0a / exportColours.rb
Last active November 22, 2020 18:12
Asset Catalog HEX colours export
# Path: .../Colors.xcassets
# Usage: ruby exportColours.rb
require 'json'
def parseHex(inp)
return inp[2..-1] if inp.index('0x') == 0
ret = ((inp.to_f) * 255).to_i.to_s(16)
ret = '0'+ ret if ret.length == 1
return ret
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wundeclared-selector"
+ (void)initialize
{
[super initialize];
#if __IPHONE_13_0
// IOS-13-TODO: Work-around for Facebook SDK to force-use Safari auth session
// instead of AuthServices session as this requires specific
@username0x0a
username0x0a / UIScrollView+ScrollbarDraggingDetect.m
Last active November 22, 2020 18:13
UIScrollView category usable for scrollbar dragging detection.
@interface UIScrollView ()
- (BOOL)_isScrubbing;
@end
@implementation UIScrollView (ScrollbarDraggingDetect)
/// A bit complicated and sophisticated subview introspection to detect whether
/// the vertical scroll indicator is “expanded for direct manipulation” (= being
/// dragged) using private accessors reads and some clang diagnostics pushing.
@username0x0a
username0x0a / Safari15StableBackFwdButtons.m
Created October 2, 2021 18:01
Safari 15 Stable Back & Forward buttons in the single-line Unified tab bar
#import <Cocoa/Cocoa.h>
#import <objc/runtime.h>
@interface Injector: NSView @end
@implementation Injector
+ (void)load {
@username0x0a
username0x0a / system_settings_differ.rb
Created June 19, 2023 19:27
Simple Ruby script that allows you to watch Property list changes (f.e. in `~/Library/Preferences`) that you can catch, export to a dot file & synchronise between multiple machines. 👍
#!/usr/bin/env ruby
# Prerequisities:
# - brew install fswawtch
# - gem install diffy
# Usage:
# cd ~/Library/Preferences; ruby system_settings_differ.rb
require 'pp'
require 'pty'
@username0x0a
username0x0a / twitter_de_x_ifier.css
Created July 24, 2023 20:28
Revert of Twitter's X logo
h1[role="heading"] {
padding-top: 2em;
}
h1[role="heading"] svg g {
opacity: 0;
}
h1[role="heading"] svg {
@username0x0a
username0x0a / plisten.rb
Created October 27, 2023 23:49
Simple Ruby script listening to `~/Library/Preferences` & printing the changes as UserDefaults change
#!/usr/bin/env ruby
require 'diffy' # gem install diffy
require 'listen' # gem install listen
class String
def colorize(color_code)
"\e[#{color_code}m#{self}\e[0m"
end
@username0x0a
username0x0a / zendesk.md
Created October 16, 2024 09:20 — forked from hackermondev/zendesk.md
1 bug, $50,000+ in bounties, how Zendesk intentionally left a backdoor in hundreds of Fortune 500 companies

hi, i'm daniel. i'm a 15-year-old with some programming experience and i do a little bug hunting in my free time. here's the insane story of how I found a single bug that affected over half of all Fortune 500 companies:

say hello to zendesk

If you've spent some time online, you’ve probably come across Zendesk.

Zendesk is a customer service tool used by some of the world’s top companies. It’s easy to set up: you link it to your company’s support email (like [email protected]), and Zendesk starts managing incoming emails and creating tickets. You can handle these tickets yourself or have a support team do it for you. Zendesk is a billion-dollar company, trusted by big names like Cloudflare.

Personally, I’ve always found it surprising that these massive companies, worth billions, rely on third-party tools like Zendesk instead of building their own in-house ticketing systems.

your weakest link

Details on the iOS "PosterBoard" System, How "Posters" work, and the Basics of Messing With It

(Mainly written by Dulark and Dootskyre with some additional help by MWRevamped)


Overview

  • What is PosterBoard?