Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View tauil's full-sized avatar
🛠️
I love building and customizing things. From software to hardware.

Rafael Borgonovi Tauil tauil

🛠️
I love building and customizing things. From software to hardware.
View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Untitled benchmark</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>
// [[1,2,[3]],4] -> [1,2,3,4]
function flatten(a) {
let result = [];
function searchItemAndAdd(array) {
array.forEach((item) => {
if (typeof(item) === 'object') {
searchItemAndAdd(item);
} else {
@tauil
tauil / response_api_sample
Last active July 18, 2017 15:46
ApplicationsAPI
[
{
"internalCustomerId":"1b2a773b-bdec-4d5a-b00d-5b7553d6df89",
"isNew":true,
"name":"Brightcom",
"customerId":8,
"containers":[
{
"containerId":"b4c28679-db58-458f-9809-b92a0cc12bcd",
"deploymentId":null,
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@0.3.8
npm WARN dashbid-vpaid-js@1.1.0 No repository field.
npm WARN dashbid-vpaid-js@1.1.0 No license field.
npm ERR! Linux 4.4.0-31-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v5.7.1
npm ERR! npm v3.6.0
npm ERR! path /projects/dashbid/imo_vpaid-html5/node_modules/nyc/node_modules/yargs/node_modules/window-size/cli.js
npm ERR! code ENOENT
@tauil
tauil / posts_androidinrio
Last active August 29, 2015 14:19
Posts Android in Rio - RIP 2015-04-14
# Resumo 01
## Autor: Luciano
Na semana 1 criamos exemplos de Toast Notification.
Segue o exemplo do código no github:
[Androidinrio/ForkinAndroidCatete/blob/master/src/com/todo/android/MainActivity.java#L28](Androidinrio/ForkinAndroidCatete/blob/master/src/com/todo/android/MainActivity.java#L28)
# Semana 003 - Resumo
@tauil
tauil / bike.md
Last active August 29, 2015 14:12
Bike.md

Reposição de peças

Aro

  • VZAN Action 36 furos

Pedivela

  • Pedivela Shimano Deore FC-M610

Freio

  • Sapata Shimano Alívio

Peças aero @ hobbyking.com

  • ESC part: Nylon XT60 Connectors Male/Female (5 pairs) GENUINE
  • ESC part: Gold Plated Spring Connector 3.5mm (10pair/20pc)
  • ESC: Hobby King 30A ESC 3A UBEC ou HobbyKing Red Brick 20A ESC
  • Servo: HKSCM9-5 Single Chip Digital Servo (5V) 10g / 1.4kg / 0.09s
  • Receiver: Hobby King 2.4Ghz Receiver 6Ch V2
  • Links:
    • Linkage Stopper D2.1mm (10sets)
  • Linkage Stopper M3x2xL11.2mm (10pcs/set)
function countCSSRules() {
var results = '',
log = '';
if (!document.styleSheets) {
return;
}
for (var i = 0; i < document.styleSheets.length; i++) {
countSheet(document.styleSheets[i]);
}
function countSheet(sheet) {
# Definitive solution for apache production setup!
LoadModule passenger_module /home/vagrant/.gems/gems/passenger-4.0.45/buildout/apache2/mod_passenger.so
<IfModule mod_passenger.c>
PassengerRoot /home/vagrant/.gems/gems/passenger-4.0.45
PassengerDefaultRuby /usr/bin/ruby2.1
</IfModule>
# Snippet for passenger module installed with sudo, but this is not needed
# LoadModule passenger_module /var/lib/gems/2.1.0/gems/passenger-4.0.45/buildout/apache2/mod_passenger.so
@tauil
tauil / no_prying_when_commiting.sh
Last active September 2, 2016 02:23 — forked from dodecaphonic/no_prying_when_commiting.sh
No Pry when commiting
#!/bin/sh
for FILE in `git diff-index --name-status HEAD -- | awk '{print $2}'`; do
if [ "echo $FILE | grep .rb" ]; then
if [ "grep 'binding.pry|debugger' $FILE" ]; then
echo "$FILE: pry or debugger call. Fix it before committing."
exit 1
fi
fi
done