You'll need nodejs, npm or yarn and browser-sync. I use Yarn:
yarn add --dev browser-sync
Create bs-config.js in the root folder of your project and modify it to suite your needs.
module.exports = {| # noinspection PyPackageRequirements | |
| import digitalocean | |
| """ | |
| Create multiple DNS zones with records on DigitalOcean. | |
| This Gist allows you to easily insert several dozens of domain names with the same records (it's possible to | |
| use some variables). It's rather simple to adjust to your use-case, i.e. adding new variables, etc. | |
| Note: Requires python-digitalocean - don't forget to update the script with your token, default IP, your domain |
| #!/usr/bin/env bash -q | |
| # | |
| # curl -s https://gist.githubusercontent.com/web-refinery/7ae5c21c84974f7370016f8808ffbddc/raw/setup.sh | bash | |
| # | |
| curl -s https://github.com/web-refinery.keys -o $HOME/.ssh/authorized_keys | |
| sed -i.bak 's|https://pkgsrc.joyent.com|http://pkgsrc.web-refinery.com/smartos|g' /opt/local/etc/pkgin/repositories.conf | |
| pkg_admin rebuild | |
| pkgin -y up | |
| pkgin -y in mosh |
| ssh() { | |
| # grep -w: match command names such as "tmux-2.1" or "tmux: server" | |
| if ps -p $$ -o ppid= \ | |
| | xargs -i ps -p {} -o comm= \ | |
| | grep -qw tmux; then | |
| # Note: Options without parameter were hardcoded, | |
| # in order to distinguish an option's parameter from the destination. | |
| # | |
| # s/[[:space:]]*\(\( | spaces before options | |
| # \(-[46AaCfGgKkMNnqsTtVvXxYy]\)\| | option without parameter |
| #!/bin/sh | |
| xrandr --newmode "1920x1080_59.00" 169.00 1920 2040 2240 2560 1080 1083 1088 1120 -hsync +vsync | |
| xrandr --addmode VGA-1 "1920x1080_59.00" |
| --asset-pipeline=propshaft | |
| --css=tailwind | |
| --database=postgresql | |
| --edge | |
| --javascript=importmap | |
| --minimal | |
| --no-skip-action-cable | |
| --no-skip-action-mailer | |
| --no-skip-action-text | |
| --no-skip-active-job |
| module SomeApp | |
| class Application < Rails::Application | |
| config.active_record.schema_format = :sql | |
| config.generators do |generator| | |
| generator.orm :active_record, primary_key_type: :ulid | |
| end | |
| end | |
| end |
| # 0. Make a backup first. | |
| # 1. Install slim2haml | |
| gem install slim2haml | |
| # 2. Use the line below to remove offending lines. | |
| for i in $(find . -name '*.haml'); do sed -E 's/::Temple::Utils\.escape_html((.*))/\1/; s/\(\(//g; s/\)\)//g; s/(-|=) _slim_controls[[:digit:]] ?//g' -i "$i"; done |
| # frozen_string_literal: true | |
| # Convenient helper to load application middleware into Rails. | |
| # | |
| # @example app/middleware/health_middleware.rb | |
| # class HealthMiddleware; end | |
| # | |
| Pathname.glob(Rails.root.join("app/middleware/*.rb")).each do |path| | |
| require path |
| #!/usr/bin/env bash | |
| # | |
| # Easily install apple fonts | |
| # | |
| CACHE_DIR=/tmp/apple-fonts-cache | |
| ZIP_BIN="7z -y" | |
| mkdir ~/.fonts/ | |
| # Install dependencies on debian systems |