Skip to content

Instantly share code, notes, and snippets.

@awcodes
awcodes / FilamentServiceProvider.php
Last active September 27, 2023 04:26
Laravel, Vite, SSL Valet with Multiple Tailwind configs
<?php
namespace App\Providers;
use Filament\Facades\Filament;
use Illuminate\Foundation\Vite;
use Illuminate\Support\ServiceProvider;
class FilamentServiceProvider extends ServiceProvider
{
@hurricup
hurricup / install_imagemagic_with_heic.sh
Last active June 19, 2024 12:59
How to install ImageMagick 7.1.0-54 with HEIC and WEBP support on Ubuntu 20.04
# inspired by https://gist.github.com/rjnienaber/af47fccb8410926ba7ea35f96c3b87fd
# remove bundled ImageMagick
sudo apt remove imagemagick -y
# install base dependencies
sudo apt-get install -y \
build-essential \
git \
libde265-dev \
@bbonamin
bbonamin / event.rb
Created December 23, 2011 20:59
Globalize3 implementation on ActiveAdmin with nested forms
#app/models/event.rb
class Event < ActiveRecord::Base
translates :title, :description
has_many :event_translations
accepts_nested_attributes_for :event_translations, :allow_destroy => true
end
@kevinansfield
kevinansfield / 20111218135715_globalize_models.rb
Created December 21, 2011 12:17
Globalize3 support with tabs in Active Admin
# db/migrate/20111218135715_globalize_models.rb
class GlobalizeModels < ActiveRecord::Migration
def up
NewsItem.create_translation_table!(
{:title => :string, :body => :text},
{:migrate_data => true}
)
end