Skip to content

Instantly share code, notes, and snippets.

View goatslacker's full-sized avatar

Josh Perez goatslacker

View GitHub Profile
@TsunaMoo
TsunaMoo / GAME_MASTER_POKEMON_v0_2.tsv
Last active August 9, 2023 12:10 — forked from anonymous/GAME_MASTER_POKEMON_v0_2.tsv
Pokemon from GAME_MASTER protobuf file v0.2 in a .tsv
We can make this file beautiful and searchable if this error is corrected: It looks like row 4 should actually have 31 columns, instead of 20. in line 3.
PkMn Identifier EvolvesFrom EvolvesTo EvoChainID EvoStage EvolutionPips BaseStamina BaseAttack BaseDefense Type1 Type2 BaseCaptureRate BaseFleeRate CollisionRadiusM CollisionHeightM CollisionHeadRadiusM MovementType MovementTimerS JumpTimeS AttackTimerS QuickMoves CinematicMoves PokemonClass PokedexHeightM PokedexWeightKg HeightStdDev WeightStdDev CandyFamily CandyToEvolve AnimTime
1 Bulbasaur 0 Ivysaur 1 1 NORMAL 90 126 126 GRASS POISON 0,16 0,10 0,38 0,65 0,27 JUMP 10,00 1,15 29,00 Vine Whip, Tackle Sludge Bomb, Seed Bomb, Power Whip 1,00 0,70 6,90 0,09 0,86 001_BULBASAUR 25 6d56d53fdaac2a3f6d56d53f93a9ea3f0000000036ab0a403333b33fbfbbbb3f
2 Ivysaur Bulbasaur Venusaur 1 2 NORMAL 120 156 158 GRASS POISON 0,08 0,07 0,32 0,64 0,25 JUMP 23,00 1,50 8,00 Razor Leaf, Vine Whip Sludge Bomb, Solar Beam, Power Whip 1,00 1,00 13,00 0,13 1,63 001_BULBASAUR 100 36ab2a40daac2a3f6d56d53f36ab0a4000000000000000406d56d53fdbdddd3f
3 Venusaur Ivysaur 0 1 3 NORMAL 160 198 200 GRASS POISON 0,04 0,05 0,76 1,03 0,38 JUMP 11,00 1,25
anonymous
anonymous / GAME_MASTER_POKEMON_v0_2.tsv
Created July 16, 2016 19:26
Pokemon from GAME_MASTER protobuf file v0.2 in a .tsv
We can make this file beautiful and searchable if this error is corrected: It looks like row 3 should actually have 27 columns, instead of 12. in line 2.
PkMn BaseStamina BaseAttack BaseDefense Type1 Type2 BaseCaptureRate BaseFleeRate CollisionRadiusM CollisionHeightM CollisionHeadRadiusM MovementType MovementTimerS JumpTimeS AttackTimerS QuickMoves CinematicMoves AnimTime Evolution EvolutionPips PokemonClass PokedexHeightM PokedexWeightKg HeightStdDev WeightStdDev FamilyId CandyToEvolve
1 90 126 126 HoloPokemonType.POKEMON_TYPE_GRASS HoloPokemonType.POKEMON_TYPE_POISON 0.1599999964237213 0.10000000149011612 0.3815000057220459 0.6539999842643738 0.27250000834465027 HoloPokemonMovementType.POKEMON_ENC_MOVEMENT_JUMP 10.0 1.149999976158142 29.0 d601dd01 5a3b76 6d56d53fdaac2a3f6d56d53f93a9ea3f0000000036ab0a403333b33fbfbbbb3f 02 HoloPokemonClass.POKEMON_CLASS_NORMAL 1 0.699999988079071 6.900000095367432 0.08749999850988388 0.862500011920929 HoloPokemonFamilyId.V0001_FAMILY_BULBASAUR 25
2 120 156 158 HoloPokemonType.POKEMON_TYPE_GRASS HoloPokemonType.POKEMON_TYPE_POISON 0.07999999821186066 0.07000000029802322 0.3187499940395355 0.637499988079071 0.2549999952316284 H
@lencioni
lencioni / find-dead-js-modules.sh
Last active June 26, 2017 18:51 — forked from trotzig/find-dead-js-modules.sh
This script will find javascript modules that aren't currently used in your application.
#!/bin/bash
# Make the script fail on the first error encountered.
set -euo pipefail
# Create a temp folder that we can use to store files in.
if [ "$(uname -s)" = "Darwin" ]; then
tmp_dir=$(mktemp -d -t find-dead-modules.XXXXXXXX)
else
tmp_dir=$(mktemp -d --tmpdir find-dead-modules.XXXXXXXX)
@iam4x
iam4x / connectToStores.md
Last active October 9, 2015 22:29
`connectToStores` decorator for https://github.com/goatslacker/alt

connecToStores.jsx

import React, { Component, PropTypes } from 'react';

export default function connectToStores(reducer) {
  return function(DecoratedComponent) {
    return class ConnectToStoresWrapper extends Component {
      static contextTypes = { flux: PropTypes.object.isRequired }
@gaearon
gaearon / combining.js
Created June 3, 2015 18:03
Combining Stateless Stores
// ------------
// counterStore.js
// ------------
import {
INCREMENT_COUNTER,
DECREMENT_COUNTER
} from '../constants/ActionTypes';
const initialState = { counter: 0 };
@abunsen
abunsen / spec.md
Last active August 29, 2015 14:21
TicTacToe spec

So I built an algorithm that tries to lose tictactoe no matter what. If you'd like to battle your algorithm against mine, I think it would be fun. This is the spec of what your server should accept & return. If you built an algorithm that can beat it, please tweet me @bunsen.

Your server should accept GET requests with the following parameters:

  • row
  • col
  • mark
  • grid - will be a url encoded array, like this: [["x",%20"x",%20nil],%20[nil,%20nil,%20"o"],%20[nil,%20"o",%20nil]]

It should return JSON that looks like this:

@gaearon
gaearon / reduce-store-time-travel.js
Last active January 30, 2024 05:08
Time travelling concept with reducey stores and state atoms inspired by https://gist.github.com/threepointone/43f16389fd96561a8b0b#comment-1447275
/**
* Stores are just seed + reduce function.
* Notice they are plain objects and don't own the state.
*/
const countUpStore = {
seed: {
counter: 0
},
reduce(state, action) {
@zxbodya
zxbodya / render-react-with-rxjs.md
Last active November 1, 2021 08:49
React with RxJS, reactive way :)

Observable React elements with RxJS

Note: if you want to skip history behind this, and just looking for final result see: rx-react-container

When I just started using RxJS with React, I was subscribing to observables in componentDidMount and disposing subscriptions at componentWillUnmount.

But, soon I realised that it is not fun to do all that subscriptions(that are just updating property in component state) manually, and written mixin for this...

Later I have rewritten it as "high order component" and added possibility to pass also obsarvers that will receive events from component.

@mattmccray
mattmccray / async-data-fetching.md
Last active August 29, 2015 14:17
Example async data fetching pattern.

Async Data Fetching

Consider it a given that this talks to a RESTful API (simple crud and, in my case, predicate filtering).

There is a FetchStore that manages the API calls, ensuring there aren't duplicate calls, resolving promises once data arrives, etc. The store itself is rather opaque. It doesn't have any public accessors.

The FetchActions defines two actions for clients to call, and two for other stores to consume in the dispatch cycle:

import alt from './alt'
@sebmarkbage
sebmarkbage / Enhance.js
Last active January 31, 2024 18:33
Higher-order Components
import { Component } from "React";
export var Enhance = ComposedComponent => class extends Component {
constructor() {
this.state = { data: null };
}
componentDidMount() {
this.setState({ data: 'Hello' });
}
render() {