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
@ozzpy
ozzpy / servicos.ts
Created November 6, 2020 13:52
servicos.ts
import { Injectable } from '@angular/core';
import {Observable, Subject} from 'rxjs';
import {HttpClient, HttpHeaders, HttpParams} from '@angular/common/http';
import {environment} from '../../../environments/environment';
import {Storage} from '@ionic/storage';
import {TagsModel} from '../_models/tags.model';
import {map} from 'rxjs/operators';
import {API_PUBLIC, API_TAGS} from '../_server';
@Injectable({
@ozzpy
ozzpy / banco_codigo.json
Created November 2, 2020 23:47 — forked from antoniopresto/banco_codigo.json
JSON bancos do brasil com código
[
{
"value": "001",
"label": "Banco do Brasil S.A."
},
{
"value": "003",
"label": "Banco da Amazônia S.A."
},
{
@ozzpy
ozzpy / resources.js
Created October 28, 2020 17:58
resources.js
const fs = require('fs');
function copyImages(sourcePath, targetPath, images) {
for (const icon of images) {
let source = sourcePath + icon.source;
let target = targetPath + icon.target;
fs.copyFile(source, target, err => {
if (err) throw err;
console.log(`${source} >> ${target}`);
});
/**
* addProductWoo - approved
*/
if( $_filter && $_filter=='addProductWoo' ) {
$id = isset( $_dataPost['id']) ? $_dataPost['id'] : null;
try {
$productId = $decrypto->block(base64_decode($id));
package com.stuff.app.crypto
import javax.crypto.Cipher
import javax.crypto.spec.SecretKeySpec
import javax.crypto.SecretKey;
class Crypto {
@ozzpy
ozzpy / uid-php
Created March 19, 2019 15:37
uid-php
$username = posix_getpwuid(posix_geteuid())['name'];
@ozzpy
ozzpy / Ubuntu 18.04 - nginx1.4 - php7.2 : wordpress
Last active January 17, 2023 18:21
Ubuntu 18.04 - nginx1.4 - php7.2 : wordpress
server {
listen 80;
listen [::]:80;
root /var/www/html;
index index.php index.html index.htm;
server_name example.com www.example.com;
client_max_body_size 500M;
location / {
#!/usr/bin/env bash
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 / Invizzo_Bematech.php
Created January 18, 2018 15:05
EXEMPLO PHP - Bematech 4200 TH - NAO FISCAL - USB - octoBema - MP2032.DLL - WINDOWS - pt_BR
<?php
class Invizzo_Bematech
{
private $_registro = "310DBDAC-85FF-4008-82A8-E22A09F9460B";
private $_impressora = 7;
private $_porta = "USB";
private $_texto;
private $_texto_barcode;
@ozzpy
ozzpy / nginx-add-host
Created November 29, 2017 18:29
nginx-add-host
server {
listen 80;
listen [::]:80;
root /home/${OZZPY_DOMAIN}/www/public;
index index.php index.html index.htm;
server_name ${OZZPY_DOMAIN} www.${OZZPY_DOMAIN};