Skip to content

Instantly share code, notes, and snippets.

Avatar
🤠

Daniel Mathews dmathewwws

🤠
View GitHub Profile
@dmathewwws
dmathewwws / URLSession POST.swift
Created Nov 5, 2016
URLSession POST request example
View URLSession POST.swift
private static func createUserEventData(user:SKUser, eventType:SKEventType, sticker:Sticker?) {
// server endpoint
let endpoint = "https://app.stickerkit.io/userEvent/v1/\(user.projectID)"
guard let endpointUrl = URL(string: endpoint) else {
return nil
}
//Make JSON to send to send to server
@dmathewwws
dmathewwws / google-autocomplete.ipynb
Created Nov 12, 2020 — forked from mariolambe/google-autocomplete.ipynb
Extract Google Autocomplete keywords with Python
View google-autocomplete.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View MediaPlayerIOSPodcastTitles.m
@implementation MediaPlayerIOSPodcastTitles
@synthesize bridge = _bridge;
// Export a native module
// https://facebook.github.io/react-native/docs/native-modules-ios.html
RCT_EXPORT_MODULE();
// Export constants
// https://facebook.github.io/react-native/releases/next/docs/native-modules-ios.html#exporting-constants
- (NSDictionary *)constantsToExport
View Day1.swift
//:> # Swift
//:
//: * Modern
//: * Objective-C Interoperability
//: * Open source
//: * Interactive Playgrounds
//:
//:> # Playgrounds
//:
//: * Live rendering of code you type
@dmathewwws
dmathewwws / gist:37a18558426cea5edc84
Created Jul 11, 2015
How to limit UITableView row reordering to a section
View gist:37a18558426cea5edc84
override func tableView(tableView: UITableView, targetIndexPathForMoveFromRowAtIndexPath sourceIndexPath: NSIndexPath, toProposedIndexPath proposedDestinationIndexPath: NSIndexPath) -> NSIndexPath {
if sourceIndexPath.section != proposedDestinationIndexPath.section {
var row = 0
if sourceIndexPath.section < proposedDestinationIndexPath.section {
row = tableView.numberOfRowsInSection(sourceIndexPath.section) - 1
}
return NSIndexPath(forItem: row, inSection: sourceIndexPath.section)
}
return proposedDestinationIndexPath;
}
View gist:60494574f57010bffc77a2c4da47afe8
### Keybase proof
I hereby claim:
* I am dmathewwws on github.
* I am dmathewwws (https://keybase.io/dmathewwws) on keybase.
* I have a public key ASA6VopZCFaRU5Dj47XLIQrIoK3x5RNm61QxFDeQbStwiwo
To claim this, I am signing this object:
@dmathewwws
dmathewwws / gist:348d55d3d9cdcb61a1afc66ea3bafcad
Created Dec 1, 2017
Info.plist for XML / OPML Document types
View gist:348d55d3d9cdcb61a1afc66ea3bafcad
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleIcons</key>
<dict>
<key>CFBundlePrimaryIcon</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>Echo-Icon.png</string>
@dmathewwws
dmathewwws / gist:b5f8c021bf1bed391a54251a75a2cb4d
Created Dec 1, 2017
Info.plist for XML / OPML Document types
View gist:b5f8c021bf1bed391a54251a75a2cb4d
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleIcons</key>
<dict>
<key>CFBundlePrimaryIcon</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>Echo-Icon.png</string>
View WWDC Sessions by Topics.md

WWDC Sessions by Topics

Language and Runtime

  • WWDC 2012 Session 405 — Modern Objective-C
  • WWDC 2012 Session 413 — Migration to Modern Objective-C
  • WWDC 2013 Session 228 — Hidden Gems in Cocoa and Cocoa Touch
  • WWDC 2014 Session 402 — Introduction to Swift
  • WWDC 2014 Session 403 — Intermediate Swift
  • WWDC 2014 Session 404 — Advanced Swift