This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace :db do | |
namespace :backup do | |
def ensure_not_production | |
if Rails.env.production? | |
puts "This task cannot be run in production environment for safety reasons." | |
exit 1 | |
end | |
end | |
desc "Create a backup of the PostgreSQL database" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# frozen_string_literal: true | |
require 'fileutils' | |
# Define your source and destination directories | |
source_dir = 'content/blog' | |
posts_destination_dir = 'src/_posts' | |
images_destination_dir = 'src/images' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Load NODE_VERSION from .env file | |
export $(grep NODE_VERSION .env | xargs) | |
# Check if NODE_VERSION is set | |
if [ -z "$NODE_VERSION" ]; then | |
echo "NODE_VERSION is not set in .env file." | |
exit 1 | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module ApplicationHelper | |
def will_paginate(coll_or_options = nil, options = {}) | |
if coll_or_options.is_a? Hash | |
options = coll_or_options | |
coll_or_options = nil | |
end | |
options = options.merge renderer: TailwindUIPaginationRenderer unless options[:renderer] | |
super(*[coll_or_options, options].compact) | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Template Usage | |
* <div data-controller="chart"> | |
* <canvas id="element" width="400" height="400"></canvas> | |
* </div> | |
* | |
*/ | |
/* | |
* Sample Data Structure |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//------------------------------------------------------------------------------------------------------------------------- | |
➜ Desktop node -v | |
v12.18.2 | |
➜ Desktop npm -v | |
6.14.5 | |
➜ Desktop yarn -v | |
1.22.4 | |
//------------------------------------------------------------------------------------------------------------------------- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
workflows: | |
version: 2 | |
test_and_release: | |
jobs: | |
- build | |
- release: | |
requires: | |
- build |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jobs: | |
build: | |
executor: my-executor | |
steps: | |
- checkout | |
- restore_cache: | |
keys: | |
- v2-deps-{{ .Branch }}-{{ checksum "package-lock.json" }} | |
- v2-deps-{{ .Branch }}- | |
- v2-deps- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
executors: | |
my-executor: | |
docker: | |
- image: cypress/base:8 | |
environment: | |
TERM: xterm | |
working_directory: ~/app |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: 2.1 | |
executors: | |
my-executor: | |
docker: | |
- image: cypress/base:8 | |
environment: | |
TERM: xterm | |
working_directory: ~/app |
NewerOlder