Skip to content

Instantly share code, notes, and snippets.

View mikehouse's full-sized avatar

Mikhail Demidov mikehouse

  • Thailand
View GitHub Profile
@mikehouse
mikehouse / View+Debug.swift
Last active October 3, 2023 08:54
SwiftUI View Debug Tracking
extension View {
public func debugView<T: View>(_ type: T.Type, file: String = #filePath, line: UInt = #line) -> some View {
#if DEBUG
return background(DebugView(type: type, file: file, line: line))
#else
return self
#endif
}
}
#EXTM3U
#EXTINF:-1 proxy="onltvone_comedy" group-title="Entertainment",Paramount Comedy
https://tvonline.live/paramount-comedy-online.php
@mikehouse
mikehouse / show_all_provisioning_profiles_on_my_mac.sh
Last active December 6, 2023 11:18
Gel list of all mobileprovision in the MacOS system Xcode
#!/bin/sh -e
cd ~/Library/MobileDevice/Provisioning\ Profiles/
echo ""
for file in $(ls | grep 'mobileprovision'); do
XML=$(security cms -D -i $file)
FOUND_CREATION_DATE=false
@mikehouse
mikehouse / How_to_pair_apple_tv_to_mac.txt
Last active December 21, 2022 15:48
How to pair Apple TV to MacOS via WiFi
1. Make sure Mac and Apple TV have the same network ("AirPlay and HomeKit", "Allow Access" is set to "Anyone in the Same Network")
2. In Xcode open "Devices & Simulators" window
3. On Apple TV open "Remote App And Device" -> "Remote App And Device"
4. Click "pair" and enter code
5. If "pair" reapear again then turn off the wifi on your Mac for 10 seconds and then turn it on again (https://developer.apple.com/forums/thread/108459)
6. Maybe needed to delete the TV from ingored list https://stackoverflow.com/a/63195311/3614746
@mikehouse
mikehouse / parse_text_segment.py
Created June 22, 2022 09:35
Parse __TEXT __text segment for Mach-O binary in python
#!/usr/bin/env python3
from macholib.MachO import MachO
import os
import hashlib
# Taken and a bit modified from https://www.programcreek.com/python/example/111986/macholib.MachO.MachO
def extract_shellcode(filename):
macho_filename = filename
fileoffset = 0
#EXTM3U x-tvg-url="https://iptv-org.github.io/epg/guides/af.xml,https://iptv-org.github.io/epg/guides/al.xml,https://iptv-org.github.io/epg/guides/by.xml,https://iptv-org.github.io/epg/guides/ca.xml,https://iptv-org.github.io/epg/guides/ee.xml,https://iptv-org.github.io/epg/guides/fr.xml,https://iptv-org.github.io/epg/guides/lu.xml,https://iptv-org.github.io/epg/guides/ru.xml,https://iptv-org.github.io/epg/guides/uk.xml,https://iptv-org.github.io/epg/guides/us.xml"
#EXTINF:-1 group-title="Entertainment",Paramount Comedy
http://hls4.stb.md/PARAMOUNT_COMEDY_H264/tracks-v1a1/mono.m3u8?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpcCI6Ijk2LjMwLjY4LjEyNyIsIm5iZiI6MTY3MjY0ODc0NywiZXhwIjoxNjcyNzM1MTQ3LCJpYXQiOjE2NzI2NDg3NDcsImlzcyI6InN0Yi5zdGFybmV0Lm1kIn0.-riyqWMOfGwS0zWtmK89l3jA-H2kEPqh2w-uHhuEUFM
#EXTINF:-1 group-title="Entertainment",Дом Кино
https://s208.glaz.tv:8082/liveg/domkino.stream/chunks.m3u8?nimblesessionid=51371518&wmsAuthSign=c2VydmVyX3RpbWU9MS8yLzIwMjMgMTE6MDM6MTcgQU0maGFzaF92YWx1ZT01WGE2RFg5OWNJSlNx
defaults write http://com.apple.dt.Xcode ShowDVTDebugMenu -bool YES
sudo touch /Applications/Xcode.app/Contents/Developer/AppleInternal/Library/Xcode/AppleInternal.plist
Ryzen 9 3900 OEM
XMR Best Score for minimum TDP:
CPU Core 4175 Mz (all cores) | 1.10625 CPU Volts | 15664 H/s
DRAM Ryzen Calcularot 3200 Fast preset (voltage 1.355, Soc 0,975, CCD 0.9, IOD 0.9, VDDP 0.7)
Vcore: 1.08 V
RAM_DISK=/Volumes/ramdisk
if [[ ! -d $RAM_DISK ]]; then
exit 0
fi
PROJECT_ROOT=$HOME/Development
PROJECT_ROOT_RSYNC=$PROJECT_ROOT/rsync
if [[ ! -d $PROJECT_ROOT_RSYNC ]]; then
#!/bin/bash
RAM_DISK=/Volumes/ramdisk/
if [[ ! -d ${RAM_DISK} ]]; then
exit 0
fi
APP_CODE='AppCode 2020.3 EAP.app'
let url = Bundle.main.url(forResource: "cat1", withExtension: "jpg")!
let size: CGSize = CGSize(width: 60, height: 90)
let scale = UIScreen.main.scale
// Bind the URL to the object without decoding (will not use memory yet).
let options = [kCGImageSourceShouldCache:false] as CFDictionary
let source = CGImageSourceCreateWithURL(url as CFURL, options)
let dimension = max(size.width, size.height) * scale