Skip to content

Instantly share code, notes, and snippets.

View rodrigorm's full-sized avatar

Rodrigo Moyle rodrigorm

  • Santos/SP - Brazil
View GitHub Profile
@rodrigorm
rodrigorm / rn-cli.config.js
Created May 8, 2020 02:07
React Native devServer proxy like webpack
const { createProxyMiddleware } = require('http-proxy-middleware');
module.exports = {
server: {
enhanceMiddleware: (metroMiddleware, server) => {
// console.log(middleware);
// console.log(server);
const proxyMiddleware = createProxyMiddleware('/api', { target: 'http://localhost:3000' });
message = {
type: 'chat' | 'groupchat' | 'normal',
body: 'Olá'
};
messageForm = {
type: 'chat' | 'groupchat' | 'normal',
form: {
title: '',
instruction: '',
@rodrigorm
rodrigorm / .gitignore
Last active July 14, 2017 19:29
neyjson
node_modules/

Keybase proof

I hereby claim:

  • I am rodrigorm on github.
  • I am rodrigorm (https://keybase.io/rodrigorm) on keybase.
  • I have a public key ASCtSlbTtVSHa0KgnttCRAFLjb_MaZQ9tzsrtbJPgy9Vrwo

To claim this, I am signing this object:

#!/usr/bin/env bash
mysql -uroot -proot benchmark -e 'INSERT INTO orders_5min (id, created, value) SELECT SQL_NO_CACHE id, created, value FROM orders;'
mysql -uroot -proot benchmark -e 'TRUNCATE TABLE orders;'
# mysql -uroot -proot benchmark -e 'SELECT COUNT(*) FROM orders_5min;'
@rodrigorm
rodrigorm / .Xmodmap
Last active December 15, 2015 13:18
My home configuration files
!! No Caps Lock
clear lock
!! Make Caps_lock an escape key.
keycode 0x42 = Escape

How to code drunk

Some people born with it, some people are self-taught on this, some people just discover how. How about a guide on how to code great software while still drunk as a cow?

Rules

  • You can add your patterns by forking this gist.
  • You must be drunk before sending a pattern.
@rodrigorm
rodrigorm / feed.xml
Created April 11, 2012 15:41
Hintee XML Feed for Stores
<?xml version="1.0" encoding="utf-8"?>
<products>
<!--
Product Definition:
* name: required, product name as show in the page
* url: required, url used to buy the product
-->
<product name="T-shirt Name" url="http://example.com/product?id=999">
<!--
Image Definition:
@rodrigorm
rodrigorm / README.md
Created August 8, 2011 01:43
Configuration file to use PHP with Ruby rack

Installation

First you need php-cgi, i used brew with Formula below:

$ curl -O https://gist.github.com/raw/1131062/7ae1709453a8a19ce9c030bf41d544dd08d96d85/php.rb
$ mv php.rb `brew --prefix`/Library/Formula
$ brew install php --with-mysql

Second, install this ruby gems:

@rodrigorm
rodrigorm / build.xml
Created March 16, 2011 12:52
Ant build i'm using on CakePHP projects + Hudson CI
<project name="CakePHP" default="build">
<target name="clean">
<delete dir="build" />
</target>
<target name="prepare">
<mkdir dir="build/junit" />
<mkdir dir="build/logs" />
<chmod perm="a+rw">
<fileset dir="app/tmp" />