This file contains hidden or 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
/*global __DEV__*/ | |
import StackTrace from 'stacktrace-js'; | |
const Fabric = require('react-native-fabric'); | |
const { Crashlytics } = Fabric; | |
//call this to start capturing any no-handled errors | |
exports.init = function(captrueOnDebugMode){ | |
if (__DEV__ && !captrueOnDebugMode) { | |
return; |
This file contains hidden or 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 | |
curl 'https://goo.gl/api/analytics' --data 'security_token&url=http%3A%2F%2Fgoo.gl%2FBKGdcm' --compressed |
This file contains hidden or 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
using UnityEngine; | |
using System.Collections.Generic; | |
using System; | |
using System.Text; | |
using System.Net; | |
using System.Net.Sockets; | |
using System.Threading; | |
using System.Linq; |
This file contains hidden or 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
// I2C device class (I2Cdev) demonstration Arduino sketch for MPU6050 class | |
// 10/7/2011 by Jeff Rowberg <[email protected]> | |
// Updates should (hopefully) always be available at https://github.com/jrowberg/i2cdevlib | |
// | |
// Changelog: | |
// 2013-05-08 - added multiple output formats | |
// - added seamless Fastwire support | |
// 2011-10-07 - initial release | |
/* ============================================ |
This file contains hidden or 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
// I2C device class (I2Cdev) demonstration Arduino sketch for MPU6050 class | |
// 10/7/2011 by Jeff Rowberg <[email protected]> | |
// Updates should (hopefully) always be available at https://github.com/jrowberg/i2cdevlib | |
// | |
// Changelog: | |
// 2013-05-08 - added multiple output formats | |
// - added seamless Fastwire support | |
// 2011-10-07 - initial release | |
/* ============================================ |
This file contains hidden or 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
... | |
// modify the initiator of the packet | |
uint8_t teapotPacket[20] = { '$', 0x02, | |
0,0, 0,0, 0,0, 0,0, | |
0,0, 0,0, 0,0, | |
0x00, 0x00, '\r', '\n' }; | |
... | |
loop() { | |
... |
This file contains hidden or 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
// !!! Attention !!! | |
void initPort (SerialPort port) { | |
// set this encoding to extend the ascii range | |
port.Encoding = System.Text.Encoding.GetEncoding(28591); | |
} | |
// Take a string and parse the quaternion and corresponding index | |
// return: | |
// quat = Quaternion.identity if packet is invalid | |
// index = -1 if packet is invalid |
This file contains hidden or 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
var getTenPinBowlingScore = function (result) { | |
// construct the array from string | |
var resultArr = result.split(',').map(s => { | |
return parseInt(s) | |
}) | |
var calculatedResult = resultArr.reduce((preVal, curVal, curIdx, arr) => { | |
// calcualte any extra score |
This file contains hidden or 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
import java.text.SimpleDateFormat | |
import java.util.Date | |
import scala.collection._ | |
import sys.process._ | |
import java.io._ | |
import org.apache.spark.SparkContext | |
import org.apache.spark.SparkContext._ | |
import org.apache.spark.SparkConf | |
import org.apache.spark.scheduler._ |
This file contains hidden or 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
/* absolution position + transform approach */ | |
.parent { | |
height: 100vh; | |
position: relative; | |
.children { | |
position: absolute; | |
top: 50%; | |
left: 50%; | |
transform: translate(-50%, -50%); |