Skip to content

Instantly share code, notes, and snippets.

NX-SM400

Essa é a versão em português

For the English (en-US) version check THIS LINK

A algum tempo, alguns modelos de smart plug com o padrão de tomada brasileiro começaram a aprecer no AliExpress.

@locopine
locopine / webpack.mix.js
Created March 24, 2021 11:43
Laravel Valet + Laravel Mix + BrowserSync
const mix = require('laravel-mix');
/* ... */
if (! mix.inProduction()) {
let homedir = require('os').homedir();
// e.g SESSION_DOMAIN = myapp.test
let domain = process.env.SESSION_DOMAIN;
@locopine
locopine / README.md
Created April 4, 2021 11:45 — forked from argentinaluiz/README.md
VSCode - Guia para configuração do ambiente com Docker
@locopine
locopine / contact-create.blade.php
Created April 5, 2021 00:03 — forked from NandoKstroNet/contact-create.blade.php
View Componente Livewire com Bootstrap
<div>
<h2>Criar Contato</h2>
<div>
<form wire:submit.prevent="create" method="post">
<div class="col-12">
@if (session()->has('message'))
<div class="alert alert-danger">
{{ session('message') }}

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@locopine
locopine / mysql-docker.sh
Created April 22, 2021 11:21 — forked from spalladino/mysql-docker.sh
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
@locopine
locopine / DTB_2014_Municipios.sql
Created May 10, 2021 04:17 — forked from EthraZa/DTB_2014_Municipios.sql
Tabela simples (MySQL) com a lista atualizada de Códigos de Municípios do IBGE, com 7 dígitos, baseada na lista 2014 v2 em ftp://geoftp.ibge.gov.br/organizacao_territorial/divisao_territorial/2014/
CREATE TABLE IF NOT EXISTS `municipios` (
`id` int(7) NOT NULL,
`estado` varchar(19) COLLATE utf8_unicode_ci DEFAULT NULL,
`uf` char(2) COLLATE utf8_unicode_ci DEFAULT NULL,
`municipio` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
INSERT INTO `municipios` (`id`, `estado`, `uf`, `municipio`) VALUES
(1100015, 'Rondônia', 'RO', 'Alta Floresta D\'Oeste'),
@locopine
locopine / Estados_array.json
Created May 10, 2021 04:17 — forked from EthraZa/Estados_array.json
Array de Arrays com Estados[0] e Siglas[1] do Brasil. Baseado em https://github.com/felipefdl/cidades-estados-brasil-json
[
["Acre", "AC"],
["Alagoas", "AL"],
["Amazonas", "AM"],
["Amapá", "AP"],
["Bahia", "BA"],
["Ceará", "CE"],
["Distrito Federal", "DF"],
["Espírito Santo", "ES"],
["Goiás", "GO"],
@locopine
locopine / cfop.sql
Created May 10, 2021 04:19 — forked from EthraZa/cfop.sql
Tabela (MySQL) de Código Fiscal de Operações e Prestações - CFOP
SET NAMES utf8;
SET time_zone = '+00:00';
SET foreign_key_checks = 0;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
CREATE TABLE `cfop` (
`id` char(4) COLLATE utf8_unicode_ci NOT NULL,
`descricao` varchar(200) COLLATE utf8_unicode_ci NOT NULL,
`aplicacao` varchar(530) COLLATE utf8_unicode_ci DEFAULT NULL,
PRIMARY KEY (`id`)
@locopine
locopine / .phpcsfixer
Created August 16, 2021 23:11 — forked from sarthaksavvy/.phpcsfixer
PHP CS Fixer
<?php
return PhpCsFixer\Config::create()
->setRules(array(
'@PSR2' => true,
'array_indentation' => true,
'array_syntax' => array('syntax' => 'short'),
'combine_consecutive_unsets' => true,
'method_separation' => true,
'no_multiline_whitespace_before_semicolons' => true,