Skip to content

Instantly share code, notes, and snippets.

View lpj145's full-sized avatar
😁
Good Feeling!

Marcos Dantas lpj145

😁
Good Feeling!
View GitHub Profile
@lpj145
lpj145 / CalculoInssNovo.php
Last active April 22, 2020 04:02
Calculo novo inss por faixas.
<?php
function calcularAliqPorFaixa($numero, array $faixasDeAliquotas) {
$calcPorcetagem = function($numero, $alvo) {
return ($numero * $alvo) / 100;
};
$calcAliq = function(float $aliquota, float $alvoUm, ?float $alvoDois = 0) use ($numero, $calcPorcetagem) {
if (($numero <= $alvoUm || $numero >= $alvoUm) && $alvoDois <= 0) {
return $calcPorcetagem($aliquota, $alvoUm);
}
import api from 'Services/http/api.js';
const clientesApi = new api('/api/pessoas');
export default {
listarTodos () {
return clientesApi
.find()
.equal("id", 2)
.execute()
@VitorLuizC
VitorLuizC / SignInForm.vue
Created January 10, 2019 17:49
SignInForm
<template>
<form-container ref="SignInForm" :schema="schema">
<form class="SignInForm" slot-scope="{ errors, fields }">
<v-entry-text
type="text"
class="entry"
label="Código AASP"
:error="errors.code"
:value="fields.code"
@input="fields.code = $event.replace(/\D/g, '')"
@FergusInLondon
FergusInLondon / DockerClient.php
Created April 23, 2018 23:41
Example Docker Engine API Client using PHP
<?php
class DockerClient {
/** @param resource */
private $curlClient;
/** @param string */
private $socketPath;
@antoniopresto
antoniopresto / banco_codigo.json
Last active March 25, 2025 06:43
JSON bancos do brasil com código
[
{
"value": "001",
"label": "Banco do Brasil S.A."
},
{
"value": "003",
"label": "Banco da Amazônia S.A."
},
{
@hootlex
hootlex / Component.vue
Created December 8, 2016 00:47 — forked from nickbasile/Component.vue
How to use a namespaced action in a Vue.js component
<template>
<div>
<button @click="increment">Increment</button>
</div>
</template>
<script>
import { mapActions } from 'vuex'
export default{
methods: {
@mobilemind
mobilemind / git-tag-delete-local-and-remote.sh
Last active April 22, 2025 20:08
how to delete a git tag locally and remote
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName