Skip to content

Instantly share code, notes, and snippets.

View iuryLandin's full-sized avatar
🦉
Working

Iury Landin iuryLandin

🦉
Working
View GitHub Profile
@iuryLandin
iuryLandin / medicamentos-example.json
Created August 12, 2024 22:56
Exemplo do banco de bulas de medicamentos ANVISA
{
"totalRegistros": 3,
"medicamentos": [
{
"apresentacoes": [
{
"codigo": 1187394,
"apresentacao": "(0,625 ML + 400 MG + 0,30 ML + 0,013 ML) 15 ML SOL OR CT FR VD AMB X 150 ML.",
"formasFarmaceuticas": [
"SOLUÇAO ORAL"
@iuryLandin
iuryLandin / readme.md
Created March 22, 2024 22:23 — forked from rjozefowicz/readme.md
Paged.js demo + Puppeteer

HTML to export - includes Paged.js polyfill:

<!DOCTYPE HTML>
<html>

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <script src="https://unpkg.com/pagedjs/dist/paged.polyfill.js"></script>
</head>
@iuryLandin
iuryLandin / enviar_arquivo_guzzle.php
Created August 2, 2023 19:37
enviar_arquivo_guzzle.php
<?php
function send_media($file)
{
$WP_AUTH = env('WP_AUTH');
$thumb_id = null;
$client = new \GuzzleHttp\Client([
'headers' => [
'Authorization' => "Basic $WP_AUTH"
@iuryLandin
iuryLandin / search text with accent postgresql.txt
Created July 18, 2023 13:31
search text with accent postgresql
CREATE EXTENSION unaccent;
CREATE OR REPLACE FUNCTION f_unaccent(text)
RETURNS text AS
$func$
SELECT public.unaccent('public.unaccent', $1) -- schema-qualify function and dictionary
$func$
LANGUAGE sql
IMMUTABLE;
@iuryLandin
iuryLandin / valor_por_extenso.php
Created July 10, 2023 20:27
Valor por extenso
<?php
function valorPorExtenso($valor = 0, $maiusculas = false, $moeda = false, $np = false)
//$maiusculas true para definir o primeiro caracter
//$moeda true para definir se escreve Reais / Centavos para usar com numerais simples ou monetarios
{
$rt = '';
// verifica se tem virgula decimal
if (strpos($valor, ",") > 0) {
// retira o ponto de milhar, se tiver
@iuryLandin
iuryLandin / estados_br.html
Created January 16, 2023 20:46
select estados brasileiros html
<select id="estado" name="estado">
<option value="AC">Acre</option>
<option value="AL">Alagoas</option>
<option value="AP">Amapá</option>
<option value="AM">Amazonas</option>
<option value="BA">Bahia</option>
<option value="CE">Ceará</option>
<option value="DF">Distrito Federal</option>
<option value="ES">Espírito Santo</option>
<option value="GO">Goiás</option>
@iuryLandin
iuryLandin / 404-error-page.markdown
Created December 21, 2022 15:44
404 error page
@iuryLandin
iuryLandin / get_ig_profile.php
Created March 23, 2022 16:35
RETORNAR PERFIL DO INSTAGRAM
public function get_instagram(Request $request)
{
date_default_timezone_set('America/Sao_Paulo');
$result = file_get_contents('https://www.instagram.com/adcamponacaomadureira/?__a=1');
$objeto = json_decode($result);
$posts = $objeto->graphql->user->edge_owner_to_timeline_media->edges;
$images = array();
@iuryLandin
iuryLandin / perfex_hooks_list
Created January 14, 2022 17:40 — forked from JamesSimpson/perfex_hooks_list
Full Perfex Hook List - For Perfex CRM Developers
File ---> application\controllers\admin\Authentication.php:
23: hooks()->do_action('admin_auth_init');
80: hooks()->do_action('after_staff_login');
107: hooks()->do_action('after_staff_login');
117: hooks()->do_action('after_staff_login');
219: hooks()->do_action('after_user_logout');
File ---> application\controllers\admin\Auto_update.php:
14: hooks()->do_action('before_perform_update', $latest_version);
@iuryLandin
iuryLandin / putty_backup.bat
Created August 5, 2021 23:55
Putty backup
@echo off
echo.
COLOR D
TITLE PUTTY BACKUP
echo.
echo ______________________________________
echo.
echo PUTTY BACKUP
echo ______________________________________