PORT=3001 bun run dev & PORT=3000 bun run proxy.ts
  
    
      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
    
  
  
    
  | ##Create a migration | |
| ### rails g migration make_unicode_friendly | |
| class MakeUnicodeFriendly < ActiveRecord::Migration | |
| def change | |
| alter_database_and_tables_charsets "utf8", "utf8_general_ci" | |
| end | |
| private | |
| def alter_database_and_tables_charsets charset = default_charset, collation = default_collation | 
  
    
      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
    
  
  
    
  | const e = new KeyboardEvent("keydown", { | |
| bubbles : true, | |
| cancelable : true, | |
| shiftKey : true, | |
| keyCode : 13 | |
| }); | |
| const input = document.querySelectorAll('input')[0] | |
| input.dispatchEvent(e) | 
  
    
      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
    
  
  
    
  | { | |
| "extends": "stylelint-config-standard", | |
| "plugins": [ | |
| "stylelint-selector-bem-pattern", | |
| "@namics/stylelint-bem" | |
| ], | |
| "rules": { | |
| "max-nesting-depth": 1, | |
| "comment-no-empty": true, | |
| "declaration-no-important": true, | 
  
    
      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
    
  
  
    
              Show hidden characters
| { | |
| "extends": "airbnb", | |
| "plugins": [ | |
| "react", | |
| "jsx-a11y", | |
| "import" | |
| ], | |
| "parserOptions": { | |
| "ecmaFeatures": { | |
| "jsx": true | 
  
    
      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
    
  
  
    
  | "*": | |
| "atom-material-ui": | |
| colors: | |
| abaseColor: | |
| red: 96 | |
| green: 125 | |
| blue: 139 | |
| alpha: 1 | |
| genAccent: true | |
| paintCursor: true | 
  
    
      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
    
  
  
    
  | config.generators do |generate| | |
| generate.helper false | |
| generate.assets false | |
| generate.view_specs false | |
| generate.test_framework :rspec | |
| generate.factory_girl dir: 'factories' | |
| 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
    
  
  
    
  | if(window.loaded_files == undefined){ | |
| window.loaded_files = {}; | |
| } | |
| window.loadCSSAsync = function(path, name){ | |
| if(loaded_files[name] == undefined){ | |
| var cb = function() { | |
| var l = document.createElement('link'); l.rel = 'stylesheet'; | |
| l.href = path; | |
| var h = document.getElementsByTagName('head')[0]; h.parentNode.insertBefore(l, h); | |
| }; | 
  
    
      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
    
  
  
    
  | { "X-CSRF-Token": $('meta[name="csrf-token"]').attr('content') } | 
  
    
      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
    
  
  
    
  | require 'mini_magick' | |
| class ImageabilityValidator < ActiveModel::EachValidator | |
| def validate_each(record, attribute, value) | |
| if image_changed?(record, attribute, value) | |
| pic = MiniMagick::Image.open(value.path) | |
| if pic[:height] < options[:min][1] || pic[:width] < options[:min][0] | |
| record.errors.add(attribute, "should be greater than #{options[:min][0]}x#{options[:min][1]} pixels") | |
| end | 
NewerOlder