- Rails {{VERSION}} · Ruby {{VERSION}} · PostgreSQL {{VERSION}}
- Tailwind CSS v4 · Turbo · Stimulus
- ViewComponent · Lookbook
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
| # frozen_string_literal: true | |
| class IconComponent < ViewComponent::Base | |
| class IconNotFoundError < StandardError; end | |
| attr_reader :icon, :size, :options | |
| # Chnage default size class based on your project | |
| def initialize(icon, size: "size-6", **options) | |
| @icon = icon |
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
| source "https://rubygems.org" | |
| git_source(:github) { |repo| "https://github.com/#{repo}.git" } | |
| gem "rails" | |
| gem "bcrypt" | |
| gem "bootsnap", require: false | |
| gem "importmap-rails" | |
| gem "solid_cable" | |
| gem "solid_cache" |
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
| WEBVTT | |
| 00:00:00.000 --> 00:00:02.000 | |
| This is a video testing the captions | |
| 00:00:02.000 --> 00:00:04.000 | |
| feature. Do the captions work? | |
| 00:00:05.000 --> 00:00:06.000 | |
| yep. |
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 Example | |
| def self.run | |
| HTTP.get('http://www.example.com/?a=b&c=4&d[]=1&d[]=2&d[]=3') | |
| end | |
| end | |
| RSpec.describe Example do | |
| describe '::run' do | |
| it 'should match an explicit query hash' do | |
| stub_request(:get, 'www.example.com') |
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 | |
| COMMIT_MSG_FILE=$1 | |
| # Exit immidiately if there is already some context for the commit | |
| PATTERN="^\[.+\]" | |
| COMMIT_MSG_SUMMARY=`head -n 1 $COMMIT_MSG_FILE` | |
| if [[ $COMMIT_MSG_SUMMARY =~ $PATTERN ]]; then | |
| exit 0 | |
| 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
| flickr = FlickRaw::Flickr.new | |
| photos = flickr.interestingness.getList(per_page: ARGV[0]) | |
| photos.each do |photo| | |
| photo_url = flickr.photos.getSizes(photo_id: photo.id)[-1].source | |
| photo_format = photo_url.split('.').last | |
| photo_file = "~/Photos/Wallpapers/flickr/#{photo.title}#{photo_format}" |
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 | |
| # Install brew (will install xcode tools) | |
| /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
| # Install Brewed Ruby | |
| brew install ruby | |
| # Install Brewed Git | |
| brew install git |
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
| extension UIColor { | |
| class var flat_turquoise: UIColor { | |
| return UIColor(colorLiteralRed: 26 / 255.0, green: 188 / 255.0, blue: 156 / 255.0, alpha: 1.0) | |
| } | |
| class var flat_greenSea: UIColor { | |
| return UIColor(colorLiteralRed: 22 / 255.0, green: 160 / 255.0, blue: 133 / 255.0, alpha: 1.0) | |
| } | |
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 | |
| E_INPROPER_USAGE=300 | |
| DEF_NAME="MyApp" | |
| DEF_VERSION="8.4" | |
| DEF_INCLUDE_TESTS=true | |
| makepodfile() { | |
| echo "Creating Podfile" |
NewerOlder