Skip to content

Instantly share code, notes, and snippets.

View seanoshea's full-sized avatar

Sean O'Shea seanoshea

View GitHub Profile
<html class=" compound_unit device mobile no-os no-touch no-hd"><head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport">
<meta content="black" name="apple-mobile-web-app-status-bar-style">
<meta content="Tapjoy: The destination for mobile apps and games on Android, iPhone and iPad." name="description">
<meta content="games, mobile games, mobile apps, ios, android, iphone, ipad, itouch" name="keywords">
<meta content="https://www.tapjoy.com/images/ic_launcher_96x96.png" property="og:image">
<link content="image/vnd.microsoft.icon" href="/favicon.ico" rel="shortcut icon">
<link href="/images/tjgames-114x114.png" rel="apple-touch-icon-precomposed">
@seanoshea
seanoshea / Too Many Pops
Created February 21, 2017 01:41
Too Many Pops
if isInSettings {
UserDefaults.standard.setValue(true, forKey: "hasDoneTour")
self.navigationController?.setNavigationBarHidden(false, animated: false)
_ = navigationController?.popToRootViewController(animated: true)
} else {
_ = navigationController?.popViewController(animated: true)
_ = navigationController?.popViewController(animated: true)
}
{
"creativeData": {
"reward": "20",
"currency": "Super Points",
"hideReward": false,
"connection": "wifi",
"forceLandscape": false,
"closeButtonVisible": false,
"iframe_url": null,
"videoTrackingUrls": {
{
"key": "5df29830-ed8a-4a65-bf6e-2147b53a84cf",
"attrs": {
"time": [
"1476296257.669023"
],
"controller": [
"beacons"
],
"app_id": [
▸ Building Pods/CatalogByConvention-iOS8.0 [Debug]
▸ Check Dependencies
▸ Building Pods/MaterialMotionRuntime-iOS8.0 [Debug]
▸ Check Dependencies
▸ Building Pods/MaterialMotionRuntime-iOS9.3 [Debug]
▸ Check Dependencies
▸ Building Pods/CatalogByConvention-iOS9.3 [Debug]
▸ Check Dependencies
▸ Building Pods/Pods-MaterialMotionRuntime-Catalog [Debug]
▸ Check Dependencies
[{
"id": "85bc6e5c-70be-4e38-a94c-2ac4098b45cb",
"app_group_id": "554bbd98-4a71-8000-8000-e7363c000162",
"name": "IAP_cancelled",
"description": "Cancelled In App Purchase",
"category": "failure",
"placement_type": "contextual",
"system": false,
"actions": [{
"action": {
@seanoshea
seanoshea / curl and API service
Created October 1, 2015 07:19
curl and API service
curl -H 'Accept: application/json' -X POST 'http://api.myapi.dev/users/sign_in' -d 'session[email]=tom@ad.com&session[password]=12345678'
@seanoshea
seanoshea / gist:b4e9a18fd7d9e96c0b9d
Last active September 17, 2015 19:13
react question
// I'd like to make an API call via a `moveFrameCallback` function when a dnd event happens & here's the code:
componentDidMount: function () {
var container = React.findDOMNode(this),
drake = ReactDragula([container], {
moves: function (el, source, handle, sibling) {
// there are some items in the list of children associated with this container
// which should not be draggable. Identifying these by their class name feels
// somewhat wrong (shouldnt be reaching into the DOM to understand a child's state?).
return el.className !== 'draggable';
@seanoshea
seanoshea / gist:03eadb8b4591c3ff69ce
Created September 10, 2015 13:46
App Handoff Example
1. I'm building an app for fancy stationery. I have both a website and a native iOS app
2. I deploy the app association file on https://www.myfancystationary.com
3. A user on iOS 9 uses Safari to search for some Fancy Stationary
4. Safari displays the Google search results. Some of my paid search results are at the top of the screen and the user clicks on one of those
5. The app association file tells iOS that the native iOS app is able to handle this type of URL and the URL (e.g https://www.myfancystationary.com/products/123456) is passed off into the handoff code in the iOS app
6. The user decides that they want to buy that stationary and does so all through the iOS app
How do you attribute the purchase of the product to the fact that the user pressed on a paid Google search result when the url passed into the handoff code will simply look like https://www.myfancystationary.com/products/123456.
@seanoshea
seanoshea / gist:9cdced797a4c80c3586f
Last active November 24, 2015 17:47
FFaker Issue
soshea-mbpr:market_place_api sean.oshea$ which ruby
/Users/sean.oshea/.rvm/rubies/ruby-2.1.2/bin/ruby
soshea-mbpr:market_place_api sean.oshea$ ruby --version
ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-darwin13.0]
soshea-mbpr:market_place_api sean.oshea$ which rails
/Users/sean.oshea/.rvm/gems/ruby-2.1.2/bin/rails
soshea-mbpr:market_place_api sean.oshea$ rails --version
Rails 4.0.2