Skip to content

Instantly share code, notes, and snippets.

View rafayepes's full-sized avatar

Rafa Yepes rafayepes

View GitHub Profile
@rafayepes
rafayepes / robot.js
Created December 4, 2012 21:26 — forked from randompast/robot.js
QR-bot-009
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {
var rx = robot.position.x;
var ry = robot.position.y;
var aH = robot.arenaHeight;
var aW = robot.arenaWidth;
robot.clone()
};
@rafayepes
rafayepes / robot.js
Created December 4, 2012 21:30 — forked from fabiopimentel/robot.js
[CAELUM TEAM]Megatron
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {
};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
robot.clone();
type copyOpts;
[@bs.obj] external makeCopyOpts : (~overwrite: bool=?, ~errorOnExist: bool=?, ~dereference: bool=?, ~preserveTimestamps: bool=?, ~filter: (string=>bool)=?, unit) => copyOpts = "";
/* copySync(src, dest, [options]) */
/* https://github.com/jprichardson/node-fs-extra/blob/master/docs/copy-sync.md */
[@bs.module "fs-extra"] external copySyncExternal : (string, string, copyOpts) => unit = "copySync";
let copySync = (~overwrite=?, ~errorOnExist=?, ~dereference=?, ~preserveTimestamps=?, ~filter:option(string => bool)=?,
src: string, dest: string) =>
// @flow
import React from 'react';
import { StatusBar } from 'react-native';
import hoistStatics from 'hoist-non-react-statics';
import invariant from 'invariant';
import { withNavigation } from 'react-navigation';
import type { Subscription } from '../../types';
@rafayepes
rafayepes / watch.sh
Created July 10, 2018 09:43 — forked from jordwalke/watch.sh
Watcher Script Using Unix Find.
#!/bin/bash
# Invoke like this:
# ./watch.sh my command here
# And it will run 'my command here' once, and then when it detects changes.
# TODO: Don't just search in the last second. Search for updates since the last
# completed build. Otherwise for big directories, midway through your search
# you've already taken 1s and you will miss updates.
@rafayepes
rafayepes / post.md
Created August 19, 2018 15:38 — forked from powerc9000/post.md
Globals In React Native

Recently I ran into a problem in React Native.

I wanted to be able to have more granular control of my build besides React Native's __DEV__.

Our QA people need to have a few tools at their disposal to run the APP vs our live and test servers. I don't want to make them download the project on Github and run it. That would force them onto a mac for iOS builds. I don't want to ship the app with __DEV__ on. It would be quite complex to have them connect to some dev package server to run the app A third option was needed. There should be a __QA__ flag. This way I can release the APP in without __DEV__ but keep some QA features I want. The naive way would be to have something like a globals.js file that you include and edit the file for different releases. eg.

FWIW: I didn't produce the content presented here (the outline from Edmond Lau's book). I've just copy-pasted it from somewhere over the Internet, but I cannot remember what exactly the original source is. I was also not able to find the author's name, so I cannot give him/her the proper credits.


Effective Engineer - Notes

What's an Effective Engineer?