Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View code-matt's full-sized avatar

code-matt

  • Bitreel
  • Boston MA
  • 09:59 (UTC -04:00)
View GitHub Profile
@mswanson
mswanson / configure-store.js
Last active November 9, 2019 01:06
Wiring up Redux-ORM with Redux Saga and Slice Reducers
// called in app root js file
// Classes and functions we need to build the store and initial state
import { createStore, applyMiddleware } from 'redux';
import createSagaMiddleware from 'redux-saga';
import InitialStateBuider from './initial-state-builder';
// Sagas and Reducers
import rootSaga from '../modules/root-saga';
import rootReducer from '../modules/root-reducer';
@chourobin
chourobin / 0-bridging-react-native-cheatsheet.md
Last active April 11, 2024 15:02
React Native Bridging Cheatsheet
@jasonwatt
jasonwatt / GAME_MASTER_v0_1.decoded.categorized.json
Last active November 27, 2018 19:39
OUTDATED - v0.29 Client - GAME_MASTER_v0_1.decoded.categorized.json
{
"Badges": [
{
"TemplateId": "BADGE_BATTLE_ATTACK_WON",
"Badge": {
"BadgeType": "BADGE_BATTLE_ATTACK_WON",
"BadgeRanks": 4,
"Targets": [10, 100, 1000]
}
}, {
@rmkane
rmkane / GAME_DATA_HISTORY.json
Last active April 19, 2024 07:17
Pokemon GO - Game Data Statistics
[ {
"Date" : "2016-07-30",
"Data" : {
"Moves" : [
{ "ID" : 13, "Key" : "Power", "Old Value" : 15, "New Value" : 25 },
{ "ID" : 14, "Key" : "Power", "Old Value" : 70, "New Value" : 120 },
{ "ID" : 18, "Key" : "Power", "Old Value" : 25, "New Value" : 30 },
{ "ID" : 20, "Key" : "Power", "Old Value" : 15, "New Value" : 25 },
{ "ID" : 21, "Key" : "Power", "Old Value" : 35, "New Value" : 40 },
{ "ID" : 22, "Key" : "Power", "Old Value" : 55, "New Value" : 80 },
@maisano
maisano / RouteTransition.jsx
Last active September 15, 2023 07:29
Using react-motion with react-router
import React, { PropTypes } from 'react';
import { TransitionMotion, spring } from 'react-motion';
/**
* One example of using react-motion (0.3.0) within react-router (v1.0.0-rc3).
*
* Usage is simple, and really only requires two things–both of which are
* injected into your app via react-router–pathname and children:
*
* <RouteTransition pathname={this.props.pathname}>
@5sw
5sw / View.m
Last active February 16, 2018 03:35
UIView subclass that renders a SceneKit scene using SCNRenderer
#import <UIKit/UIKit.h>
#import <SceneKit/SceneKit.h>
#import <OpenGLES/ES2/gl.h>
#import <OpenGLES/ES2/glext.h>
@interface View : UIView
@property (strong, nonatomic) SCNScene *scene;
- (void)renderFrame;
@buschtoens
buschtoens / annularSector.js
Created December 2, 2012 19:14
Generate the path for an annular sector svg
function deg2rad(deg) {
return deg * Math.PI / 180;
}
function annularSector(centerX, centerY, startAngle, endAngle, innerRadius, outerRadius) {
startAngle = deg2rad(startAngle + 180);
endAngle = deg2rad(endAngle + 180);
var p = [
[centerX + innerRadius * Math.cos(startAngle), centerY + innerRadius * Math.sin(startAngle)]
/*!
* JavaScript function to calculate the destination point given start point latitude / longitude (numeric degrees), bearing (numeric degrees) and distance (in m).
*
* Original scripts by Chris Veness
* Taken from http://movable-type.co.uk/scripts/latlong-vincenty-direct.html and optimized / cleaned up by Mathias Bynens <http://mathiasbynens.be/>
* Based on the Vincenty direct formula by T. Vincenty, “Direct and Inverse Solutions of Geodesics on the Ellipsoid with application of nested equations”, Survey Review, vol XXII no 176, 1975 <http://www.ngs.noaa.gov/PUBS_LIB/inverse.pdf>
*/
function toRad(n) {
return n * Math.PI / 180;
};