Install xcode command line tools (or check if they're already installed)
xcode-select --install
Do we have libxml installed already?
xsltproc --version
class TemplateRenderer { | |
constructor(template) { | |
this.template = template | |
} | |
render(data) { | |
const clone = document.importNode(this.template.content, true) | |
this.#processNodes(clone, data) | |
return clone | |
} |
module TailwindHelper | |
# Create a responsive grid. This is necessary in order to make every cell the same size (height & width) | |
# | |
# @example | |
# <%= responsive_grid(total_cells: 3, gap: 3, cols: { xs: 1, sm: 2, md: 3, lg: 4, xl: 5 }, "pt-4") do %> | |
# <% 3.times do %> | |
# <%= content_tag(:div, "Cell", class: "h-32 w-full bg-gray-200") %> <-- important to ensure the cell is the same size | |
# ... | |
# <% end %> | |
# <% end %> |
# frozen_string_literal: true | |
class SalesListOrganizationCsvDownload < Avo::BaseAction | |
self.name = "CSV Download" | |
self.may_download_file = true | |
self.confirm_button_label = "Download" | |
def handle(**args) | |
_models, _fields, _current_user, resource = args.values_at(:models, :fields, :current_user, :resource) |
https://www.nerdfonts.com/font-downloads
The following solution thanks to @hackerzgz & @snacky101 will install all nerd fonts;
brew tap homebrew/cask-fonts
brew search '/font-.*-nerd-font/' | awk '{ print $1 }' | xargs -I{} brew install --cask {} || true
# Add color coding based on Rails environment for safety | |
if defined? Rails | |
banner = if Rails.env.production? | |
"\e[41;97;1m #{Rails.env} \e[0m " | |
else | |
"\e[42;97;1m #{Rails.env} \e[0m " | |
end | |
# Build a custom prompt |
There are trhee diffrent time zones in rails
UTC
, but do not change itconfig.time_zone
should be set when an app dose not support multiple time zones# A list of possible reserved words | |
reserved_words = [ | |
# Companies | |
'amazon', 'apache', 'apple', 'atlassian', 'facebook', 'github', 'google', | |
'htc', 'microsoft', 'mozilla', 'nokia', 'rim', 'samsung', 'sony', 'toshiba', | |
'twitter', 'wikipedia', | |
# Operating systems | |
'android', 'centos', 'debian', 'dos', 'fedora', 'ios', 'linux', 'mac', |
var elixir = require('laravel-elixir'); | |
var gutil = require('gulp-util'); | |
// If 'gulp watch' is run | |
if (gutil.env._.indexOf('watch') > -1) { | |
// Enable watchify for faster builds | |
elixir.config.js.browserify.watchify.enabled = true |