This file contains 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
<div data-controller="smart-scroll" | |
data-action="smart-scroll:added->smart-scroll#handleAdded | |
resize->smart-scroll#handleAdded | |
scroll->smart-scroll#handleScroll"> | |
<div data-controller="smart-scroll-item"> | |
aya: an an | |
</div> | |
<div data-controller="smart-scroll-item"> | |
hatate: ni hao | |
</div> |
This file contains 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
import { Controller } from "stimulus" | |
import { DirectUpload } from "@rails/activestorage" | |
import Dropzone from "dropzone" | |
import { getMetaValue, findElement, removeElement, insertAfter } from "helpers" | |
Dropzone.autoDiscover = false | |
export default class extends Controller { | |
static targets = [ "input" ] |
This file contains 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
These commands are meant to be followed in conjunction with: | |
https://www.youtube.com/watch?v=xpYpaRUFzTI | |
https://gorails.com/deploy/ubuntu/18.04 | |
ssh [email protected] | |
adduser deploy | |
adduser deploy sudo | |
exit | |
ssh-copy-id [email protected] | |
ssh-copy-id [email protected] |
This file contains 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
# I wrote this up one evening while auditing an app for localization. It can almost certainly be optimized, but it works! | |
namespace :i18n do | |
# This method is doing most of the heavy lifting. It accepts a full filename with path and returns | |
# a hash of arrays, where each key is one of the different groupings | |
def scan_file_for_literals file_with_path | |
file = File.read(file_with_path) | |
# First off, omit any straight ruby code that isn't emitted, since it won't need to be localized | |
file.gsub! /^<%[^=].*%>/m, '' |