Skip to content

Instantly share code, notes, and snippets.

View tadeubdev's full-sized avatar
🎯
Focusing

Tadeu Barbosa tadeubdev

🎯
Focusing
  • Espírito Santo, Brasil
View GitHub Profile
@tadeubdev
tadeubdev / convert-postman-to-insomnia.js
Created August 3, 2022 18:51 — forked from wesleyegberto/convert-postman-to-insomnia.js
Script to convert a Postman backupt to Insomnia
/**
* Script to parse a Postman backupt to Insomnia keeping the same structure.
*
* It parses:
* - Folders
* - Requests
* - Environments
*
* Notes: Insomnia doesn't accept vars with dots, if you are using you must replace yours URLs manually (see ENVIRONMENTS_EXPORTS).
*/
@tadeubdev
tadeubdev / v-cloak.md
Created February 27, 2018 11:35 — forked from adamwathan/v-cloak.md
Useful CSS utilities for Vue.js cloaking

Handy helpers for controlling visibility of elements until Vue has compiled.

Use like:

<div v-cloak>
  <h1>
    <span class="v-cloak--inline">Loading...</span> <!-- Only displayed before compiling -->
    <span class="v-cloak--hidden">{{ post.title }}</span> <!-- Hidden until compiling is finished -->
 
@tadeubdev
tadeubdev / gist:cb49a576cee6c07c79a43812e36ab539
Last active June 27, 2020 12:54 — forked from johanmeiring/gist:3002458
"git lg" alias for pretty git log
# git log short
git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --"
# git status short
git config --global alias.st "status -s"
@tadeubdev
tadeubdev / pearson-correlation.js
Created December 20, 2017 13:58 — forked from matt-west/pearson-correlation.js
Pearson Correlation (JavaScript)
/**
* @fileoverview Pearson correlation score algorithm.
* @author matt.west@kojilabs.com (Matt West)
* @license Copyright 2013 Matt West.
* Licensed under MIT (http://opensource.org/licenses/MIT).
*/
/**
* Calculate the person correlation score between two items in a dataset.
{
"estados": [
{
"sigla": "AC",
"nome": "Acre",
"cidades": [
"Acrelândia",
"Assis Brasil",
"Brasiléia",
"Bujari",
<?php
function renderPhpFile($filename, $vars = null)
{
if (is_array($vars) && !empty($vars))
{
extract($vars);
}
ob_start();
include $filename;
<?php
### --- Snip --- ###
App::after(function($request, $response)
{
// HTML Minification
if(App::Environment() != 'local')
{
if($response instanceof Illuminate\Http\Response)