This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"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.", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if(!$worry){ | |
foreach($things as $little_thing){ | |
$little_thing->all_right(); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$string = 'Hi, visit my website: http://beto.euqueroserummacaco.com'; | |
$string = preg_replace('/\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|$!:,.;]*[A-Z0-9+&@#\/%=~_|$]/i', '', $string); | |
echo $string; | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$address = 'avenida+gustavo+paiva,maceio,alagoas,brasil'; | |
$geocode = file_get_contents('http://maps.google.com/maps/api/geocode/json?address='.$address.'&sensor=false'); | |
$output= json_decode($geocode); | |
$lat = $output->results[0]->geometry->location->lat; | |
$long = $output->results[0]->geometry->location->lng; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$text = "Hi, please visit (http://www.google.com)"; | |
$text = preg_replace("#http://([A-z0-9./-]+)#", '<a href="$1">$0</a>', $text); | |
echo $text; | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# kill containers | |
function docker-kill-containers(){ | |
docker kill $(docker ps -q) | |
} | |
# remove stoped containers | |
function docker-remove-containers(){ | |
docker rm $(docker ps -a -q) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# encode | |
cat key.txt | base64 -w0 | |
# decode | |
cat stribng | base64 --decode |
NewerOlder