Skip to content

Instantly share code, notes, and snippets.

View lgmworks's full-sized avatar
🎯
Focusing

Luis Guillermo Moreno lgmworks

🎯
Focusing
View GitHub Profile
@inxilpro
inxilpro / README.md
Created July 22, 2022 21:01
Fully namespaced Tailwind config for widget or embeddable component

Sometimes you need to publish a CSS file for 3rd-party consumption (i.e. default styles for an embeddable JS widget). This set up lets you continue to use Tailwind, but scope all your styles to a specific selector.

Simply replace .internachi with your own widget namespace, set up Tailwind as you please, and run generate.sh to build a custom version of your Tailwind styles that won't interfere with other CSS rules (including the Tailwind reset).

@IlijaT
IlijaT / custom-paginator.blade.php
Last active November 24, 2023 21:38
Laravel Livewire Custom Pagination With Tailwind
@if ($paginator->hasPages())
<div class="flex items-end my-2">
@if ( ! $paginator->onFirstPage())
{{-- First Page Link --}}
<a
class="mx-1 px-4 py-2 bg-blue-900 border-2 border-blue-900 text-white font-bold text-center hover:bg-blue-400 hover:border-blue-400 rounded-lg cursor-pointer"
wire:click="gotoPage(1)"
>
<<
@ziadoz
ziadoz / mysql_install.sh
Created June 8, 2020 16:45
MySQL 8 Installation - Ubuntu 18.04 / 20.04 LTS
#!/usr/bin/env bash
password="root"
echo PURGE | sudo debconf-communicate mysql-community-server
sudo apt purge mysql-client mysql-server
sudo debconf-set-selections <<< "mysql-community-server mysql-community-server/root-pass password $password"
sudo debconf-set-selections <<< "mysql-community-server mysql-community-server/re-root-pass password $password"
sudo debconf-set-selections <<< "mysql-community-server mysql-server/default-auth-override select Use Legacy Authentication Method (Retain MySQL 5.x Compatibility)"
@danielstgt
danielstgt / imagick3.4.4-PHP7.4-forge.sh
Last active April 19, 2024 11:33
Install ImageMagick / Imagick 3.4.4 on PHP 7.4 server (Laravel Forge)
#!/bin/bash
if [ "$EUID" -ne 0 ]
then echo "Please run as root"
exit
fi
apt-get install pkg-config libmagickwand-dev -y
cd /tmp
wget https://pecl.php.net/get/imagick-3.4.4.tgz
tar xvzf imagick-3.4.4.tgz
@ratacibernetica
ratacibernetica / tether.md
Created April 25, 2019 15:24
Bypass Hotspot Tethering Limit by using the phone's unlimited plan

You could make your phone to act as a VPN Gateway

Requirements:

  • root
  • vpn server (can obtain any free openVPN from playstore)
  • Using a VPN gateway will make tethered traffic to go through the VPN.

Steps

@alejandro-martin
alejandro-martin / multiple-ssh-keys-git.adoc
Last active April 18, 2025 16:08
Configure multiple SSH Keys for Git

Use Multiple SSH Keys for Git host websites (Github, Gitlab)

This is guide about how to configure multiple SSH keys for some Git host websites such as Github, Gitlab, among others.

Creating SSH keys

  1. Create SSH directory:

@oriadam
oriadam / colorValues.js
Last active February 9, 2024 16:01
javascript convert any color to array of rgba values
// return array of [r,g,b,a] from any valid color. if failed returns undefined
function colorValues(color)
{
if (!color)
return;
if (color.toLowerCase() === 'transparent')
return [0, 0, 0, 0];
if (color[0] === '#')
{
if (color.length < 7)
@mpj
mpj / rulething.html
Created September 10, 2016 16:49
Code from episode
<html>
<head>
<style>
.row div {
height: 8px;
display: inline-block;
width: 8px;
}
.row div.active {
background-color: red;
@rbialek
rbialek / config
Created June 7, 2011 13:32
ssh/.config
Host github.com
User git
Hostname github.com
PreferredAuthentications publickey
IdentityFile /home/user/.ssh/id_rsa
@vyatri
vyatri / MimeMailParser.class.php
Created April 24, 2011 09:06
This class allows you to receive and parse email in PHP efficiently and effortlessly.
<?php
require_once('attachment.class.php');
/**
* Fast Mime Mail parser Class using PHP's MailParse Extension
* @author [email protected]
* @url http://www.fijiwebdesign.com/
* @license http://creativecommons.org/licenses/by-sa/3.0/us/
* @version $Id$