Skip to content

Instantly share code, notes, and snippets.

View gran33's full-sized avatar
❤️
Free Love

Ran Greenberg gran33

❤️
Free Love
  • Santa Inc.
  • Tel Aviv, Israel
  • X @gran33
View GitHub Profile
@adamawolf
adamawolf / Apple_mobile_device_types.txt
Last active March 10, 2025 06:40
List of Apple's mobile device codes types a.k.a. machine ids (e.g. `iPhone1,1`, `Watch1,1`, etc.) and their matching product names
i386 : iPhone Simulator
x86_64 : iPhone Simulator
arm64 : iPhone Simulator
iPhone1,1 : iPhone
iPhone1,2 : iPhone 3G
iPhone2,1 : iPhone 3GS
iPhone3,1 : iPhone 4
iPhone3,2 : iPhone 4 GSM Rev A
iPhone3,3 : iPhone 4 CDMA
iPhone4,1 : iPhone 4S
@kwangbae
kwangbae / Tidy_PHAsset
Last active October 16, 2017 07:57
Getting all photos except iCloud sharing photos using PHAsset class.
PHFetchResult* assets = [PHAsset fetchAssetsWithOptions:self.defaultOptions];
[assets enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
[list addObject:obj];
}];
PHFetchResult* collections = [PHAssetCollection fetchAssetCollectionsWithType:PHAssetCollectionTypeAlbum subtype:PHAssetCollectionSubtypeAlbumCloudShared options:nil];
[collections enumerateObjectsUsingBlock:^(PHAssetCollection* collection, NSUInteger idx, BOOL *stop) {
PHFetchResult* assets2 = [PHAsset fetchAssetsInAssetCollection:collection options:options];
[assets2 enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
@mxpr
mxpr / 0.1-export-plist.sh
Last active November 25, 2022 04:15
Export Options Plist flag in xcodebuild
# Switch xcrun to leverage Xcode 7
# Note: This won't be needed once Xcode 7 is released
# and becomes the primary Xcode in use.
export DEVELOPER_DIR=/Applications/Xcode-beta.app/Contents/Developer/
# Export Archive
xcrun xcodebuild -exportArchive -exportOptionsPlist exportPlist.plist -archivePath /path/to/app.xcarchive -exportPath /path/to/app.ipa
@phatblat
phatblat / gist:0dd175b406cf2f3fbfc9
Created August 26, 2015 01:22
xcodebuild -exportOptionsPlist available keys (Xcode 7b6)
Available keys for -exportOptionsPlist:
compileBitcode : Bool
For non-App Store exports, should Xcode re-compile the app from bitcode? Defaults to YES.
embedOnDemandResourcesAssetPacksInBundle : Bool
For non-App Store exports, if the app uses On Demand Resources and this is YES, asset packs are embedded in the app bundle so that the app can be tested without a server to host asset packs. Defaults to YES unless onDemandResourcesAssetPacksBaseURL is specified.
@lopspower
lopspower / README.md
Last active March 10, 2025 06:54
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store

@elrayle
elrayle / byebug_commands.md
Last active February 3, 2025 13:12
Byebug Cheatsheet - organized by related commands

Byebug Cheatsheet

This cheatsheet includes most of the byebug commands organized by related commands (e.g. breakpoint related commands are together).

To see official help...

Command Aliases Example Comments
help h h list top level of all commands
help cmd h cmd-alias h n list the details of a command (example shows requesting details for the next command) (this works for all commands)