Skip to content

Instantly share code, notes, and snippets.

View madeinnordeste's full-sized avatar
:octocat:
Coding

Luiz Alberto S. Ribeiro madeinnordeste

:octocat:
Coding
View GitHub Profile
@madeinnordeste
madeinnordeste / update-email-name-multiples-commits.sh
Created March 25, 2024 21:04
Change the author and committer name/email for multiple commits
#!/bin/sh
# https://stackoverflow.com/questions/750172/how-do-i-change-the-author-and-committer-name-email-for-multiple-commits
git filter-branch --env-filter '
OLD_EMAIL="your-old-email@example.com"
CORRECT_NAME="Your Correct Name"
CORRECT_EMAIL="your-correct-email@example.com"
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
then
@madeinnordeste
madeinnordeste / events.json
Created January 23, 2024 12:32
random calendar events
This file has been truncated, but you can view the full file.
[
{
"kind": "brand event",
"etag": "\"9798284412176\"",
"id": "9486a51e-b34d-3965-8f8c-30ed0919d893",
"status": "not confirmed",
"htmlLink": "http:\/\/schowalter.info\/",
"created": "2025-01-02T05:51:35.259Z",
"updated": "2025-01-02T05:51:35.259Z",
"summary": "Et est aperiam harum saepe vel necessitatibus.",
@madeinnordeste
madeinnordeste / via-cep.php
Created November 22, 2023 19:23
via cep api
public function consultZip($zip)
{
$client = new Client(["http://viacep.com.br/ws/" . $zip . "/json/"]);
$result = $client->request('get', "http://viacep.com.br/ws/" . $zip . "/json/", ['Accept' => 'application/json']);
$output = $result->getBody()->getContents();
return $output;
}
@madeinnordeste
madeinnordeste / Three-Little-Birds.php
Last active November 8, 2023 21:56
Three-Little-Birds.php
<?php
if(!$worry){
foreach($things as $little_thing){
$little_thing->all_right();
}
}
# kill containers
function docker-kill-containers(){
docker kill $(docker ps -q)
}
# remove stoped containers
function docker-remove-containers(){
docker rm $(docker ps -a -q)
}
@madeinnordeste
madeinnordeste / base64encode.sh
Created July 26, 2020 20:51
Base 64 encode file in one line
# encode
cat key.txt | base64 -w0
# decode
cat stribng | base64 --decode
@madeinnordeste
madeinnordeste / whatsapp.html
Created June 26, 2020 22:41
Float Whatsapp Button
<style type="text/css">
.float{
position:fixed;
width:60px;
height:60px;
bottom:40px;
right:40px;
background-color:#25d366;
color:#FFF;
border-radius:50px;
@madeinnordeste
madeinnordeste / remote-desktop.sh
Created November 28, 2018 20:30
Remote desktop example
#!/bin/bash
rdesktop 192.168.10.100 -f
@madeinnordeste
madeinnordeste / assinar-apk.md
Created May 4, 2018 13:38 — forked from romuloctba/assinar-apk.md
Colinha para assinar e publicar .apk

Para assinar apk:

  1. ionic build --release android vai gerar um apk na pastaDoProjeto/platforms/android/build/output/android-unsigned.apk. Renomeie o arquivo para nomeDoApk-unsigned.apk

  2. Na pasta do java/jde-AlgumaVersao/bin: keytool -genkey -v -keystore nomeDaChave.keystore -alias aliasQueVcEscolhe -keyalg RSA -keysize 2048 -validity 1000

  3. jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore nomeDaChave.keystore nomeDoApk-unsigned.apk aliasQueVcEscolheu

  4. na pasta do android-adt/sdk/build-tools/algumaVersao: zipalign -v 4 nomeDoApk-unsigned.apk nomeQueVcQuerDarParaOApk.apk

  5. Prontinho. Preencha tudo e tire os prints para o Google Play Developer Console, envie o Apk. `

###########################################################
# General Setup
###########################################################
### Application Path ###################################################################################################
# Point to your code, will be available at `/var/www`.
APPLICATION=../
### PHP Version ########################################################################################################