Links to articles, screencasts, and authors I find interesting.
Table of Contents
- Blogs
- Articles
- Screencasts
| import * as Sentry from "@sentry/react"; | |
| import { YellowBox, ErrorUtils } from "react-native"; | |
| // https://medium.com/@benhurott/dealing-with-global-errors-in-react-native-expo-as-simple-as-possible-bc8e440caeae | |
| //TODO: This will not capture native exception because we are living in JS land | |
| // for now, should probalby consider added native capture at some point too | |
| if (ErrorUtils) { | |
| ErrorUtils.setGlobalHandler((error, isFatal) => { | |
| // Capture the unhandled error and send to sentry. | |
| // Sentry doesn't see this as unhandled, add a tag to provide that context. |
| // SWIFT | |
| // ------------------------------------------------------------ | |
| import WMCCPADNS | |
| let ccpaDNSService = WMCcpaDnsService() | |
| ccpaDNSService.dnsToggle(userId: "user id",vendors: ["vendor1","vendor2"],doNotSell:true) | |
| // CHECK | |
| import WMCCPADNS | |
| let ccpaDNSService = WMCcpaDnsService() | |
| ccpaDNSService.getPreference(userId:"user id") |
| import React, { Component } from 'react'; | |
| /** | |
| * Wraps a supplied React Component with one that handles watching the page | |
| * visibility API for changes. When page visibility changes, the wrapper | |
| * component's internal state is passed down to the supplied component as a prop. | |
| * | |
| * @example | |
| * ```js | |
| * const Test = PageVisbility(YourComponent); |
| // link: https://www.youtube.com/watch?v=X8WgkMbEAVQ | |
| function beaconError(msg) { | |
| try { | |
| throw new Error(); | |
| } catch (e) { | |
| var xhr = new XMLHttpRequest(); | |
| xhr.open('POST', '/beacon'); | |
| xhr.send(msg + '\n' + e.stack); | |
| } |
| { | |
| "actual_show_time_eastern_string":"2014-10-23T00:00:10-04:00", | |
| "ad_segments":[ | |
| { | |
| "duration":121, | |
| "start_timestamp":1414039726, | |
| "show_id":"urn:ngtv-show:78676", | |
| "segment_id":"urn:ngtv-segment:257839", | |
| "state":"Actual", | |
| "title":"Commercial Break 5", |
| javascript:(function() {var e = document.getElementById('id_description');if (e) {e.value += '# Jira ticket link(s)\n\n\n# What does this do and why is it needed?\n\n\n# How to test\n\n\n# Updates\n\n\ncc: @user1 @user2 @user3';}})(); |
| /* Simple top-bottom gradient */ | |
| div { | |
| background: -webkit-linear-gradient(top, #fff, #000); | |
| background: -moz-linear-gradient(top, #fff, #000); | |
| background: -ms-linear-gradient(top, #fff, #000); | |
| background: -o-linear-gradient(top, #fff, #000); | |
| background: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#000)); | |
| background: linear-gradient(top, #fff, #000); | |
| } |