Skip to content

Instantly share code, notes, and snippets.

View tnylea's full-sized avatar
💻
Hacking away...

Tony Lea tnylea

💻
Hacking away...
View GitHub Profile
@tnylea
tnylea / laravel_sqlite.sh
Last active September 11, 2023 21:44
SED command to automatically add absolute path to sqlite file in the .env
sed -i '' -e "s|^DB_DATABASE=.*|DB_DATABASE=$PWD/database/database.sqlite|" -e 's/^DB_CONNECTION=mysql/DB_CONNECTION=sqlite/' .env
@tnylea
tnylea / welcome.blade.php
Created February 14, 2023 17:31
DevDojo welcome.blade.php for Laravel Droplet on DigitalOcean
<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Laravel</title>
<!-- Fonts -->
<link rel="preconnect" href="https://fonts.bunny.net">
@tnylea
tnylea / welcome.blade.php
Created January 10, 2023 18:56
DigitalOcean Laravel Image welcome file
<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Laravel</title>
<!-- Fonts -->
<link href="https://fonts.bunny.net/css2?family=Nunito:wght@400;600;700&display=swap" rel="stylesheet">
@tnylea
tnylea / tailwind.config.js
Last active January 2, 2023 21:24
TailwindCSS config with some common animations
/** @type {import('tailwindcss').Config} */
module.exports = {
theme: {
extend: {
fontFamily: {
thicccboi: [ "thicccboi", "sans-serif" ],
},
keyframes: {
fadeIn: {
'0%' : { opacity: 0 },
@tnylea
tnylea / tailwind-text-reveal.html
Created November 17, 2022 21:24
simple text reveal animation with GSAP
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>TailwindCSS Text Reveal Animation</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.11.3/gsap.min.js"></script>
<script src="https://unpkg.com/split-type"></script>
<script src="https://cdn.tailwindcss.com"></script>
@tnylea
tnylea / logo.svg
Created September 5, 2021 20:36
Wordsmith SVG Logo
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tnylea
tnylea / singleton.php
Last active March 2, 2018 18:39
Example PHP singleton class
<?php
class Greeting
{
// Hold an instance of the class
private static $instance;
private static $name;
// The singleton method
public static function singleton()
@tnylea
tnylea / edit-add.blade.php
Created January 30, 2018 16:13
Updated file for fixing the related products on Geekshop
@extends('voyager::master')
@section('css')
<style>
html, body{
height: auto;
}
.panel .mce-panel{
$(document).ready(function(){
// transition can be fade or slide
var transition = 'slide';
if(transition == 'slide'){
$('.slider').children().wrapAll('<div class="slider-container"></div>');
$('.slider-container').css('width', $('.slider').width() * $('.slider .content').length );
$.each($('.slider .content'), function(index, value){
$(this).addClass('slide');
$(this).css('width', $('.slider').width());
$(document).ready(function(){
// transition can be fade or slide
var transition = 'slide';
if(transition == 'slide'){
$('.slider').children().wrapAll('<div class="slider-container"></div>');
$('.slider-container').css('width', $('.slider').width() * $('.slider .content').length );
$.each($('.slider .content'), function(index, value){
$(this).addClass('slide');