Skip to content

Instantly share code, notes, and snippets.

Avatar

Andy Ibanez AndyIbanez

View GitHub Profile
View deferred_menu_example_json
[
{
"title": "Follow @AndyIbanezK",
"icon": "person.badge.plus.fill"
},
{
"title": "Block @AndyIbanez",
"icon": "xmark"
},
{
View Keybase.md

Keybase proof

I hereby claim:

  • I am andyibanez on github.
  • I am andyibanez (https://keybase.io/andyibanez) on keybase.
  • I have a public key ASCj3Fj-GRCdiIe5ui31vcgyc-h5VATZ1mzfzjpUs0uHTAo

To claim this, I am signing this object:

View Keybase.md

Keybase proof

I hereby claim:

  • I am andyibanez on github.
  • I am andyibanez (https://keybase.io/andyibanez) on keybase.
  • I have a public key ASCj3Fj-GRCdiIe5ui31vcgyc-h5VATZ1mzfzjpUs0uHTAo

To claim this, I am signing this object:

@AndyIbanez
AndyIbanez / iair.sh
Created Apr 30, 2017
Command line script to resize an iOS app icon to all the sizes specified by Apple.
View iair.sh
#!/bin/bash
# Takes a 1024x1024 app icon and produces all app icon sizes based on it.
# Requires imagemagick to work.
# USAGE iair ORIGINAL_FILE PATH_TO_OUTPUT_DIR
# Example: iair icon.png .
original_file=$1
output_dir=$2
View Making Swift Objects Behave Like an Array
struct ShoppingItem {
let name: String
let price: Float
init(name: String, price: Float) {
self.name = name
self.price = price
}
}
@AndyIbanez
AndyIbanez / UIColorFromHex Macro
Created Jan 19, 2014
Get a UIColor out of a Hex string representation.
View UIColorFromHex Macro
//I did not write this macro. Got it from somewhere else years ago.
// example usage: [view setBackgroundColor:UIColorFromHex(0x6758c8)];
#define UIColorFromHex(hexValue) [UIColor colorWithRed:((float)((hexValue & 0xFF0000) >> 16))/255.0 green:((float)((hexValue & 0xFF00) >> 8))/255.0 blue:((float)(hexValue & 0xFF))/255.0 alpha:1.0]
@AndyIbanez
AndyIbanez / dumpemall.sh
Last active Oct 7, 2015
class-dump-z a whole directory of private frameworks.
View dumpemall.sh
#!/bin/bash
# class-dump class-dump-z
# - main.h
# CDStructures.h main-Structs.h
# xxx-Protocol.h xxx.h
usage ()
{
echo "Usage: $0 executable target_directory"
You can’t perform that action at this time.