Skip to content

Instantly share code, notes, and snippets.

View ozzpy's full-sized avatar
🏠
Working from home

RAFAEL S GUIMARÃES ozzpy

🏠
Working from home
View GitHub Profile
#!/bin/bash
IMAGE=$1
CNAME=$2
PORT=$3
function buildTraefik {
cat << EOF > ~/up.sh
#!/bin/bash
docker image rm ${IMAGE}
LANGUAGE=en_US.utf8
LC_ALL=en_US.utf8
LANGUAGE=en_US.UTF-8
LC_ALL=en_US.UTF-8
LC_TIME=en_US.UTF-8
LC_MONETARY=en_US.UTF-8
LC_CTYPE=en_US.UTF-8
LC_ADDRESS=en_US.UTF-8
LC_TELEPHONE=en_US.UTF-8
LC_NAME=en_US.UTF-8
@ozzpy
ozzpy / datatables_pt_br.json
Created February 8, 2023 20:50
datatables_pt_br.json
{
"emptyTable": "Nenhum registro encontrado",
"info": "Mostrando de _START_ até _END_ de _TOTAL_ registros",
"infoFiltered": "(Filtrados de _MAX_ registros)",
"infoThousands": ".",
"loadingRecords": "Carregando...",
"zeroRecords": "Nenhum registro encontrado",
"search": "Pesquisar",
"paginate": {
"next": "Próximo",
@ozzpy
ozzpy / docker-compose.yml
Created January 26, 2023 20:37 — forked from pyrou/docker-compose.yml
Use https://traefik.me SSL certificates for local HTTPS without having to touch your /etc/hosts or your certificate CA.
version: '3'
services:
traefik:
restart: unless-stopped
image: traefik:v2.0.2
ports:
- "80:80"
- "443:443"
labels:
- "traefik.http.services.traefik.loadbalancer.server.port=8080"
@ozzpy
ozzpy / flutter_version
Created May 18, 2022 20:01
flutter version
dart pub global activate fvm
fvm install <version> 2.8.1
fvm list
fvm use <version> --force
@ozzpy
ozzpy / ionic.pagination.ts
Created January 26, 2022 20:47
ionic pagination example
import {AfterViewInit, Component, OnDestroy, OnInit, ViewChild} from '@angular/core';
import {ActivatedRoute, Router} from '@angular/router';
import {FuncsHelperService} from '../_core/_services/funcs-helper.service';
import {AuthenticationService} from '../_core/_services/authentication.service';
import {PostsService} from '../_core/_services/posts.service';
import {PostsModel} from '../_core/_models/posts.model';
import {ImagesModel} from '../_core/_models/images.model';
import {IonInfiniteScroll, IonSlides} from '@ionic/angular';
import {SeeLaterService} from '../_core/_services/see-later.service';
import {UsersService} from '../_core/_services/users.service';
@ozzpy
ozzpy / mysq-tiburcio
Last active January 17, 2023 23:08
mysql-tiburcio
sudo apt install mysql-server -y
select * from mysql.user;
select host, user, password from mysql.user;
CREATE USER 'tiburcio'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
ALTER USER 'tiburcio'@'localhost' IDENTIFIED WITH caching_sha2_password BY 'tiburcio';
GRANT ALL PRIVILEGES ON *.* TO 'tiburcio'@'localhost' WITH GRANT OPTION;
CREATE SCHEMA IF NOT EXISTS `sistema` DEFAULT CHARACTER SET utf8mb4 ;
@ozzpy
ozzpy / php-7.4-crypt-tiburcio
Last active December 9, 2021 03:30
php-7.4-crypt-tiburcio
#!/usr/bin/env bash
#@ozzpy
#
#
# Check version php and pecl
#
php -v # if default php is not 7.2 then use /usr/bin/php7.2 instead php
pecl version
sudo apt-get install php-pear
sudo apt-get install php7.4-dev -y
@ozzpy
ozzpy / video-ts
Created December 8, 2021 14:08
video-ts
import {Pipe, PipeTransform, SecurityContext} from '@angular/core';
import { DomSanitizer} from '@angular/platform-browser';
@Pipe({ name: 'safe' })
export class SafePipe implements PipeTransform {
constructor(private sanitizer: DomSanitizer) {}
transform(url) {
return this.sanitizer.bypassSecurityTrustResourceUrl(url);
// error
@ozzpy
ozzpy / gist:e444e887d3b54cbf937fda41ccc79429
Last active July 20, 2021 14:28
ionic-transparent-header
<ion-content class="ion-no-padding ion-no-margin ion-bg-dark-top" >
<ion-header class="ion-no-border">
<ion-toolbar class="ion-bg-transparent">
<ion-title>Seções</ion-title>
<ion-buttons slot="start">
<ion-back-button text="" defaultHref="/tabs/home"></ion-back-button>
</ion-buttons>
<ion-buttons slot="end">
<ion-button fill="clear" (click)="requestData()">