Skip to content

Instantly share code, notes, and snippets.

@jllubia
jllubia / covers.sh
Created October 7, 2011 17:36
Steve Jobs Magazine Covers from Kuo Design Download Script
for (( i=1; i<10; i++ ))
do
curl http://www.kuodesign.com/pineapple/coverme/images/large/STEVE-0$i.jpg > steve-0$i.jpg
done
for (( i=10; i<=82; i++ ))
do
curl http://www.kuodesign.com/pineapple/coverme/images/large/STEVE-$i.jpg > steve-$i.jpg
done
curl http://www.kuodesign.com/pineapple/coverme/images/large/STEVE-85.jpg > steve-83.jpg
curl http://www.kuodesign.com/pineapple/coverme/images/large/macpower.jpg > steve-84.jpg
#!/bin/sh
#
# Download and install a single iOS provisioning profile
# Requires https://github.com/nomad/cupertino
#
# Usage
# - Login to your account once:
# ios login
# - Configure TEAM and PROFILE (instructions below)
# - Run update_provisioning_profile.sh at anytime, usually after adding/removing devices to the profile
#!/bin/sh
#
# Download and install a single iOS provisioning profile
# Requires https://github.com/nomad/cupertino
#
# Usage
# - Login to your account once:
# ios login
# - Configure TEAM and PROFILE (instructions below)
# - Run update_provisioning_profile.sh at anytime, usually after adding/removing devices to the profile
@jllubia
jllubia / photoDeletionTest.m
Last active August 29, 2015 14:26
Deleting a picture with Photos framework causes a user prompt
__block PHObjectPlaceholder *assetPlaceholder = nil;
[[PHPhotoLibrary sharedPhotoLibrary] performChanges:^{
PHAssetChangeRequest * request = [PHAssetChangeRequest creationRequestForAssetFromImage: [UIImage imageNamed:@"icon-1024-rounded"]];
assetPlaceholder = request.placeholderForCreatedAsset;
} completionHandler:^(BOOL success, NSError *error) {
NSLog(@"creation success %d - error: %@ - place: %@", success, error, assetPlaceholder);
PHFetchResult * result = [PHAsset fetchAssetsWithLocalIdentifiers: @[assetPlaceholder.localIdentifier] options: nil];
NSLog(@"Asset fetching: %@", result);
[[PHPhotoLibrary sharedPhotoLibrary] performChanges: ^{
[PHAssetChangeRequest deleteAssets: @[result.firstObject]];
@jllubia
jllubia / gist:8833ab7b1f920c1b8718333dbb801558
Created September 26, 2025 16:43
iOS 26.0 Core Video Pixel Format Codes
Pixel Format Codes:
===================
kCVPixelFormatType_1Monochrome:
kCVPixelFormatType_2Indexed:
kCVPixelFormatType_4Indexed:
kCVPixelFormatType_8Indexed:
kCVPixelFormatType_1IndexedGray_WhiteIsZero: !
kCVPixelFormatType_2IndexedGray_WhiteIsZero: "
kCVPixelFormatType_4IndexedGray_WhiteIsZero: $
kCVPixelFormatType_8IndexedGray_WhiteIsZero: (