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 / install_php71_centos.sh
Created July 10, 2017 21:19 — forked from jniltinho/install_php71_centos.sh
Install PHP 7.1 on CentOS 7.3
#!/bin/bash
### Install PHP 7.1 on CentOS 7.3 64Bits
### http://www.shaunfreeman.name/compiling-php-7-on-centos/
### https://www.howtoforge.com/tutorial/how-to-install-php-7-on-debian/
yum -y install git gcc gcc-c++ libxml2-devel pkgconfig openssl-devel bzip2-devel curl-devel libpng-devel libjpeg-devel
yum -y install libXpm-devel freetype-devel gmp-devel libmcrypt-devel mariadb-devel aspell-devel recode-devel libpqxx-devel
yum -y install autoconf bison re2c libicu-devel libwebp-devel wget unzip net-tools libc-client-devel libpng12-devel
yum -y install libxslt-devel
@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};
@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;
#!/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 / 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 / {
@ozzpy
ozzpy / uid-php
Created March 19, 2019 15:37
uid-php
$username = posix_getpwuid(posix_geteuid())['name'];
package com.stuff.app.crypto
import javax.crypto.Cipher
import javax.crypto.spec.SecretKeySpec
import javax.crypto.SecretKey;
class Crypto {
/**
* addProductWoo - approved
*/
if( $_filter && $_filter=='addProductWoo' ) {
$id = isset( $_dataPost['id']) ? $_dataPost['id'] : null;
try {
$productId = $decrypto->block(base64_decode($id));
@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}`);
});
@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."
},
{