Skip to content

Instantly share code, notes, and snippets.

View iosdec's full-sized avatar
💻
0xDEADBEEF

Declan Land iosdec

💻
0xDEADBEEF
View GitHub Profile
#!/bin/bash
#set -e
# install-wifi - 03/05/2021 - by MrEngman.
UPDATE_SELF=${UPDATE_SELF:-1}
UPDATE_URI="http://downloads.fars-robotics.net/wifi-drivers/install-wifi"
ROOT_PATH=${ROOT_PATH:-"/"}
WORK_PATH=${WORK_PATH:-"${ROOT_PATH}/root"}
@iosdec
iosdec / sample_theme_4.0.json
Last active September 30, 2022 15:01
SampleThemeFile
{
"colors": {
"PrimaryPure": "#181D4B",
"SecondaryPure": "#FF9A66",
"PrimaryLight": "#D5D8EC",
"SecondaryLight": "#F9EBE4",
"PrimaryMedium": "#4D5387",
"SecondaryMedium": "#FAD4C0",
"PrimaryDark": "#0E0F18",
@iosdec
iosdec / uilabel_file_calculate.txt
Created January 15, 2019 15:24
UILabel calculate expected height - Objective-C
#pragma mark - Calculate height for label:
- (CGFloat)heightForText:(NSString*)text font:(UIFont*)font withinWidth:(CGFloat)width {
CGSize size = [text sizeWithAttributes:@{NSFontAttributeName:font}];
CGFloat area = size.height * size.width;
CGFloat height = roundf(area / width);
return ceilf(height / font.lineHeight) * font.lineHeight;
}
@iosdec
iosdec / Instructions.txt
Created January 2, 2019 14:06
Install libimobiledevice - OS X | Mojave
When using libimobiledevice on Mojave, I ran into a few errors with lockdown and usbmuxd.. here's a workaround that I found on the libimobiledevice issue section in GitHub:
brew update
brew uninstall --ignore-dependencies libimobiledevice
brew uninstall --ignore-dependencies usbmuxd
brew install --HEAD usbmuxd
brew unlink usbmuxd
brew link usbmuxd
brew install --HEAD libimobiledevice