Skip to content

Instantly share code, notes, and snippets.

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

Fran Perez bran921007

🏠
Working from home
View GitHub Profile
@bran921007
bran921007 / rm_mysql.md
Created October 26, 2024 05:39 — forked from vitorbritto/rm_mysql.md
Remove MySQL completely from Mac OSX

Remove MySQL completely

  1. Open the Terminal

  2. Use mysqldump to backup your databases

  3. Check for MySQL processes with: ps -ax | grep mysql

  4. Stop and kill any MySQL processes

  5. Analyze MySQL on HomeBrew:

    brew remove mysql
    
@bran921007
bran921007 / AzulPaymentGateway.php
Created September 25, 2024 14:05 — forked from luismts/AzulPaymentGateway.php
Class to handle Azul Payment Gateway Methods / Banco Popular Dominicano BPD / Azul.com.do
/**
* PHP version 5
* @package AzulPaymentGateway
* @author ideologic SRL <[email protected]>
* @since File available since Release 1
*/
<?php namespace App;
// use Illuminate\Database\Eloquent\Model;
// use DB;
@bran921007
bran921007 / AzulPaymentGateway.php
Created September 25, 2024 14:05 — forked from luismts/AzulPaymentGateway.php
Class to handle Azul Payment Gateway Methods / Banco Popular Dominicano BPD / Azul.com.do
/**
* PHP version 5
* @package AzulPaymentGateway
* @author ideologic SRL <[email protected]>
* @since File available since Release 1
*/
<?php namespace App;
// use Illuminate\Database\Eloquent\Model;
// use DB;
@bran921007
bran921007 / App\Jobs\CreateTenantDatabase.php
Created August 6, 2024 03:27 — forked from adarmanto/App\Jobs\CreateTenantDatabase.php
How to configure the unit tests for spatie/laravel-multitenancy package
<?php
namespace App\Jobs;
use App\Models\Tenant;
use Illuminate\Bus\Queueable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
// npm i axios
const axios = require('axios').default;
axios.interceptors.request.use( x => {
// to avoid overwriting if another interceptor
// already defined the same object (meta)
x.meta = x.meta || {}
x.meta.requestStartedAt = new Date().getTime();
return x;
@bran921007
bran921007 / background.js
Created March 30, 2024 18:25 — forked from danharper/background.js
Bare minimum Chrome extension to inject a JS file into the given page when you click on the browser action icon. The script then inserts a new div into the DOM.
// this is the background code...
// listen for our browerAction to be clicked
chrome.browserAction.onClicked.addListener(function (tab) {
// for the current tab, inject the "inject.js" file & execute it
chrome.tabs.executeScript(tab.ib, {
file: 'inject.js'
});
});
@bran921007
bran921007 / gist:43c8002bd220b6c6d560c81d8e2811e1
Created March 22, 2024 14:08
Copy files from SSH server into local machine
scp -r [email protected]:/path/to/remote/folder /local/destination
@bran921007
bran921007 / app.css
Created March 11, 2024 22:27
Tooltip in CSS
.tooltip {
--base: 2em;
--height: 1em;
--color: #09f;
border-image:
fill 0 / 0 / var(--height)
conic-gradient(var(--color) 0 0);
clip-path:
@bran921007
bran921007 / instagram_generic_embed_template.html
Created September 10, 2023 07:41 — forked from stevesie88/instagram_generic_embed_template.html
Embed Any Instagram Post Using Only the Shortcode
<blockquote class="instagram-media" data-instgrm-captioned data-instgrm-permalink="https://www.instagram.com/p/{{ ig_shortcode }}/?utm_source=ig_embed&amp;utm_campaign=loading" data-instgrm-version="12" style=" background:#FFF; border:0; border-radius:3px; box-shadow:0 0 1px 0 rgba(0,0,0,0.5),0 1px 10px 0 rgba(0,0,0,0.15); margin: 1px; max-width:540px; min-width:326px; padding:0; width:99.375%; width:-webkit-calc(100% - 2px); width:calc(100% - 2px);">
<div style="padding:16px;">
<a href="https://www.instagram.com/p/{{ ig_shortcode }}/?utm_source=ig_embed&amp;utm_campaign=loading" style=" background:#FFFFFF; line-height:0; padding:0 0; text-align:center; text-decoration:none; width:100%;" target="_blank">
<div style=" display: flex; flex-direction: row; align-items: center;">
<div style="background-color: #F4F4F4; border-radius: 50%; flex-grow: 0; height: 40px; margin-right: 14px; width: 40px;"></div>
<div style="display: flex; flex-direction: column; flex-grow: 1; jus