This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// hide Legal link in the bottom left corner of Apple maps in iOS 6 | |
for (UIView *v in [self.map subviews]) { | |
NSLog(@"%@", NSStringFromClass([v class])); | |
if ([NSStringFromClass([v class]) isEqualToString:@"MKAttributionLabel"]) { | |
v.hidden = YES; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#Setup the environment | |
mkdir tmp_download | |
cd tmp_download | |
#Extract IDs | |
echo "Downloading the index" | |
wget -q https://developer.apple.com/videos/wwdc2022/ -O index.html | |
cat index.html | sed -n '/data-released=\"true\"/,/class=\"video-image-link\"/p' | grep videos/play/wwdc2022 | sed -e 's/.*wwdc2022\///' -e 's/\/\"\ .*//' | sed '$!N; /^\(.*\)\n\1$/!P; D' > ../downloadData |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let expandedSections = [0, 3, 8] | |
let indexSet = IndexSet(expandedSections) | |
collectionView?.performBatchUpdates( | |
{ | |
[unowned self] in | |
if isInserted { | |
self.collectionView?.insertItems(at: indexPaths) | |
} else { | |
self.collectionView?.deleteItems(at: indexPaths) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#Setup the environment | |
mkdir tmp_download | |
cd tmp_download | |
#Extract IDs | |
echo "Downloading the index" | |
wget -q https://developer.apple.com/videos/wwdc2020/ -O index.html | |
# find parts of the document where data-released=true, all the way to the first H4 header where title of that talk is |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#Setup the environment | |
mkdir tmp_download | |
cd tmp_download | |
#Extract IDs | |
echo "Downloading the index" | |
wget -q https://developer.apple.com/videos/wwdc2019/ -O index.html | |
# find parts of the document where data-released=true, all the way to the first H4 header where title of that talk is |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public extension Dictionary { | |
func mapKeys<T>(_ transform: (Key) throws -> T) rethrows -> [T : Value] where T: Hashable { | |
var dict: [T: Value] = [:] | |
for (key, value) in self { | |
let newKey = try transform(key) | |
dict[newKey] = value | |
} | |
return dict | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#Setup the environnement | |
mkdir wwdc2017 | |
cd wwdc2017 | |
mkdir tmp_download | |
cd tmp_download | |
#Extract IDs | |
echo "Downloading the index" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ## inserting. this can be done in viewDidLoad | |
// this can be any view, here I'm adding to main view | |
UIView *containerView = self.view; | |
// load child controller | |
UIViewController *svc = [[UIViewController alloc] initWithNibName:nil bundle:nil]; | |
// kill the randomness | |
svc.view.translatesAutoresizingMaskIntoConstraints = NO; | |
// add child VC to hierarchy | |
[self addChildViewController:svc]; | |
// set initial rect |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#Setup the environnement | |
mkdir wwdc2018 | |
cd wwdc2018 | |
mkdir tmp_download | |
cd tmp_download | |
#Extract IDs | |
echo "Downloading the index" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Current as working as of 2012/4/17 | |
# Xcode 4.3.2 | |
PROJECT_ROOT="$HOME/SomeDirWhereYourProjectLives/XXXXXXXX" | |
WORKSPACE="$PROJECT_ROOT/XXXXXXXX.xcodeproj/project.xcworkspace" | |
CONFIG="AdHoc" | |
SCHEME="XXXXXXXX" |
NewerOlder