Skip to content

Instantly share code, notes, and snippets.

View rafayepes's full-sized avatar

Rafa Yepes rafayepes

View GitHub Profile
@rafayepes
rafayepes / cloudSettings
Last active July 11, 2020 06:00
Visual Studio Code Settings Sync Gist
{"lastUpload":"2019-06-20T12:49:47.814Z","extensionVersion":"v3.2.9"}

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?

@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.

@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.
// @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';
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) =>
@rafayepes
rafayepes / App.re
Created May 10, 2017 20:20
Reason JSX example
module App = {
include ReactRe.Component;
let name = "App";
type props = {
dispatch: Store.action => unit,
state: Store.state,
};
let className: string =
// Generated by BUCKLESCRIPT VERSION 1.6.1, PLEASE EDIT WITH CARE
'use strict';
var List = require("bs-platform/lib/js/list.js");
var $$Array = require("bs-platform/lib/js/array.js");
var Glamor = require("glamor");
var Pervasives = require("bs-platform/lib/js/pervasives.js");
function make(prim, prim$1, prim$2, prim$3, prim$4, prim$5, prim$6, prim$7, prim$8, prim$9, prim$10, prim$11, prim$12, prim$13, prim$14, prim$15, prim$16, prim$17, prim$18, prim$19, prim$20, prim$21, prim$22, prim$23, prim$24, prim$25, prim$26, prim$27, prim$28, prim$29, prim$30, prim$31, prim$32, prim$33, prim$34, prim$35, prim$36, prim$37, prim$38, prim$39, prim$40, prim$41, prim$42, prim$43, prim$44, prim$45, prim$46, prim$47, prim$48, prim$49, prim$50, prim$51, prim$52, prim$53, prim$54, prim$55, prim$56, prim$57, prim$58, prim$59, prim$60, prim$61, prim$62, prim$63, prim$64, prim$65, prim$66, prim$67, prim$68, prim$69, prim$70, prim$71, prim$72, prim$73, prim$74, prim$75, prim$76, prim$77, prim$78, prim$79, prim$80,
<div className="MyContainerWrapper">
<InfiniteLoader
isRowLoaded={this._isRowLoaded}
loadMoreRows={this._loadMoreRows}
rowCount={list.length}
>
{({ onRowsRendered, registerChild }) => (
<AutoSizer>
{({ width, height }) => (
<List
@rafayepes
rafayepes / designer.html
Last active August 29, 2015 14:10
designer
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;