Skip to content

Instantly share code, notes, and snippets.

View 0zuna's full-sized avatar
🎎
Whats happenig?

Ozuna 0zuna

🎎
Whats happenig?
  • Mexico
View GitHub Profile
@0zuna
0zuna / files.php
Last active June 8, 2023 17:28
reenviar archivos usando guzzle
try{
$client = new Client([
'base_uri' => env('KANGORU_MENSAJERIA_ENDPOINT'),
'timeout' => 30,
'headers' => [
'Authorization'=>env('KANGORU_MENSAJERIA_KEY'),
],
]);
@0zuna
0zuna / nginx.conf
Created February 8, 2022 19:30
nginx config to react router
server {
listen 80;
listen [::]:80;
server_name localhost;
#access_log /var/log/nginx/host.access.log main;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
@0zuna
0zuna / Cors.php
Created May 21, 2021 19:41 — forked from drewjoh/Cors.php
Laravel CORS Middleware
<?php // /app/Http/Middleware/Cors.php
namespace App\Http\Middleware;
use Closure;
class Cors {
public function handle($request, Closure $next)
{
return $next($request)
@0zuna
0zuna / download.js
Last active January 15, 2024 17:19
var a = document.createElement("a");
a.href = r.data.file;
a.download = r.data.name;
document.body.appendChild(a);
a.click();
a.remove();
const _getExcel = () => {
@0zuna
0zuna / .htaccess
Last active October 27, 2021 16:10
.htaccess
RewriteEngine on
RewriteCond %{HTTP_HOST} ^checklist.usupso.com.mx/$ [NC,OR]
RewriteCond %{HTTP_HOST} ^www.checklist.usupso.com.mx/$
RewriteCond %{REQUEST_URI} !public/
RewriteRule (.*) /public/$1 [L]
//redirect port golang example
RewriteEngine On
RewriteRule index.html http://kangoru.com:8080/ [P]
RewriteRule (.*) http://kangoru.com:8080/$1 [P]
<Directory "C:/xampp/htdocs/viaticos-api/public">
DirectoryIndex index.php
AcceptPathInfo on
AllowOverride None
Options None
Order allow,deny
Allow from all
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
SET sql_mode = 'ALLOW_INVALID_DATES';
@0zuna
0zuna / comand.sh
Created February 15, 2018 23:09
comand
sudo pacman -S mtpfs gvfs-mtp
mtp-detect
mtp-connect
lsusb
sudo vim /etc/udev/rules.d/51-android.rules
ATTR{idVendor}=="CÓDIGO_DE_IDENTIFICACIÓN_DEL_VENDEDOR", ATTR{idProduct}=="CÓDIGO_DE_IDENTIFICACIÓN_DEL_DISPOSITIVO", SYMLINK+="libmtp", MODE="660", ENV{ID_MTP_DEVICE}="1"
sudo udevadm control --reload
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot "/var/www"
ServerName localhost
ServerAlias localhost
ErrorLog ${APACHE_LOG_DIR}/all-error.log
CustomLog ${APACHE_LOG_DIR}/all-access.log common
<Directory "/var/www/">
AllowOverride All
Order Allow,Deny
function bichoso($string){
$string = str_replace("\n","[NEWLINE]",$string);
$string=htmlentities($string);
$string=preg_replace('/[^(\x20-\x7F)]*/','',$string);
$string=html_entity_decode($string);
$string = str_replace("[NEWLINE]","\n",$string);
return $string;
}