Skip to content

Instantly share code, notes, and snippets.

View guimello's full-sized avatar

Guilherme da Silva Mello guimello

  • Jundiaí, São Paulo - Brazil
View GitHub Profile
@guimello
guimello / server.js
Created June 6, 2019 17:04
Simple request logger server
const http = require("http");
const port = 8081;
const s = http.createServer();
s.on("request", (request, response) => {
response.writeHead(200);
console.log({
headers: request.headers,
@guimello
guimello / script.sh
Created April 19, 2019 19:41
Concat pm4 files lossless
# add a txt file with the files path, eg.
file GOPR1629.MP4
file GP011629.MP4
file GP021629.MP4
file GP031629.MP4
# then
ffmpeg -f concat -i list.txt -c copy output.mp4
@guimello
guimello / fix.txt
Last active March 27, 2019 14:40
Fix libfishhook RN iOS issue
Remove and add again libfishhook.a from Xcode and the path issue will resolve.
Remove from the RCTWebSocket library in Link Binary With Libraries.
https://user-images.githubusercontent.com/2400215/45737941-92981200-bc08-11e8-80fc-978147db7a9a.png
@guimello
guimello / batch.js
Created July 6, 2017 16:13
Throttle with batch execution of actions - Redux Saga
import { buffers, delay } from 'redux-saga'
import { actionChannel, call, fork, take, flush } from 'redux-saga/effects'
import { flatten } from "ramda";
yield fork(function* () {
const leChannel = yield actionChannel("LOL", buffers.expanding(20));
while (true) {
const currentAction = yield take(leChannel);
yield call(delay, 1000);
import React, {
Component,
PropTypes,
} from "react";
import {
Animated,
View,
} from "react-native";
@guimello
guimello / desafio_tagview_2016.md
Created October 13, 2016 20:46
Desafio Tagview 2016

Desafio Tagview 2016

Neste desafio você terá que desenvolver uma aplicação web ou mobile (iOS ou android).

Desta vez, você pode optar por diferentes tipos de aplicações. Abaixo está uma relação de APIs que você pode escolher:

  • Star Wars - personagens, planetas, espaçonaves, etc
  • Pokémon - informações diversas sobre eles
  • Marvel - personagens, séries, quadrinhos, etc
  • Blizzard Battle.net - estatísticas, chars, quests, bosses. Muitas informações sobre Diablo 3 e WoW
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<div class="container">
<div class="item">1</div>
@guimello
guimello / erase_sims.sh
Created March 1, 2016 20:25
Erase iOS simulator contents
xcrun simctl erase all
@guimello
guimello / README.md
Last active August 29, 2015 14:26 — forked from jxson/README.md
README.md template

Synopsis

At the top of the file there should be a short introduction and/ or overview that explains what the project is. This description should match descriptions added for package managers (Gemspec, package.json, etc.)

Code Example

Show what the library does as concisely as possible, developers should be able to figure out how your project solves their problem by looking at the code example. Make sure the API you are showing off is obvious, and that your code is short and concise.

Motivation

// Browsers behave differently when dbl clicking to select
// a range.
//
// Chrome and IE use the text node that contains the selected text
// as the startContainer with an offset to exclude any whitespace
// characters at the start of the node.
//
// Firefox will use a text node *before* the selected text
// as the startContainer, with a positive offset set to the end
// of the node. If there is no previous sibling of the selected text