Skip to content

Instantly share code, notes, and snippets.

View urameshibr's full-sized avatar
🏠
Working from home

Lucas Rodrigues urameshibr

🏠
Working from home
View GitHub Profile
<template>
<div>
<label>{{ label }}</label>
<input v-bind:value="value" v-on:input="$emit('input', $event.target.value)" />
</div>
</template>
<script>
export default {
props: ['label', 'value'],
@urameshibr
urameshibr / jq-cheetsheet.md
Created September 1, 2022 21:13 — forked from olih/jq-cheetsheet.md
jq Cheet Sheet

Processing JSON using jq

jq is useful to slice, filter, map and transform structured json data.

Installing jq

On Mac OS

brew install jq

@urameshibr
urameshibr / installing-node-with-nvm.md
Created August 30, 2022 17:45 — forked from d2s/installing-node-with-nvm.md
Installing Node.js to Linux & macOS & WSL with nvm

Installing Node.js with nvm to Linux & macOS & WSL

A quick guide on how to setup Node.js development environment.

Install nvm for managing Node.js versions

nvm allows installing several versions of Node.js to the same system. Sometimes applications require a certain versions of Node.js to work. Having the flexibility of using specific versions can help.

  1. Open new Terminal window.
@urameshibr
urameshibr / Lista de Órgãos Emissores
Created May 5, 2022 20:10 — forked from eduardo-mior/Lista de Órgãos Emissores
Lista completa de órgãos emissores de documentos de identificação.
ABNC - Academia Brasileira de Neurocirurgia
AGU - Advocacia-Geral da União
ANAC - Agência Nacional de Aviação Civil
CAER - Clube de Aeronáutica
CAU - Conselho de Arquitetura e Urbanismo
CBM - Corpo de Bombeiro Militar
CFA - Conselho Federal Administração
CFB - Conselho Federal de Biblioteconomia
CFBIO - Conselho Federal de Biologia
CFBM - Conselho Federal de Biomedicina
@urameshibr
urameshibr / test.retry.php
Created May 3, 2022 13:36 — forked from mudge/test.retry.php
A retry function for PHP.
<?php
require_once dirname(__FILE__) . '/../lib/simpletest/autorun.php';
function retry($f, $delay = 10, $retries = 3)
{
try {
return $f();
} catch (Exception $e) {
if ($retries > 0) {
sleep($delay);
@urameshibr
urameshibr / ActionService.php
Created December 18, 2021 05:05
PHP Laravel Action Dispatcher with default options (humble example)
<?php
namespace App\Actions;
class ActionService
{
protected array $defaultOptions = [];
/**
* @return array
var mediaJSON = { "categories" : [ { "name" : "Movies",
"videos" : [
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ],
"subtitle" : "By Blender Foundation",
"thumb" : "images/BigBuckBunny.jpg",
"title" : "Big Buck Bunny"
},
{ "description" : "The first Blender Open Movie from 2006",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ],
define ROOT "/var/www/meusite/public/"
define SITE "meusite.com.br"
<VirtualHost *:80>
DocumentRoot "${ROOT}"
ServerName ${SITE}
ServerAlias *.${SITE}
<Directory "${ROOT}">
AllowOverride All
Require all granted
@urameshibr
urameshibr / change-menu-style.js
Last active May 5, 2020 06:20
Alterar estilo de menu ao rolar a tela
var $ = window.jQuery;
$(window).scroll(function(){
$('header.elementor-sticky--active')
.toggleClass('scrolled-navbar', $(this).scrollTop() > 800);
});
@urameshibr
urameshibr / get-latest-tag-on-git.sh
Created January 15, 2020 01:32 — forked from rponte/get-latest-tag-on-git.sh
Getting latest tag on git repository
# The command finds the most recent tag that is reachable from a commit.
# If the tag points to the commit, then only the tag is shown.
# Otherwise, it suffixes the tag name with the number of additional commits on top of the tagged object
# and the abbreviated object name of the most recent commit.
git describe
# With --abbrev set to 0, the command can be used to find the closest tagname without any suffix:
git describe --abbrev=0
# other examples