- Generate new rails app using
--webpackflag
rails new myApp --webpack=vueNote:
- You can use
--webpack=angularfor angular application and--webpack=reactfor react.
| %sl-alert.popup-toast{id: id, type: type, open: false, duration: duration, closable: true} | |
| %sl-icon{slot: "icon", name: icon} | |
| - if title.present? | |
| %strong= title | |
| %br | |
| = text |
| require "mini_magick" | |
| # require "initials_avatar" | |
| # InitialsAvatar.new(initials: "PC").avatar_path | |
| class InitialsAvatar | |
| BACKGROUND_COLORS = [ | |
| "#C53030", "#9C4221", "#975A16", "#2F855A", "#2C7A7B", "#2B6CB0", "#434190", "#553C9A", "#97266D" | |
| ] | |
| def initialize(initials:) |
| # http://askubuntu.com/questions/505446/how-to-install-ubuntu-14-04-with-raid-1-using-desktop-installer | |
| # http://askubuntu.com/questions/660023/how-to-install-ubuntu-14-04-64-bit-with-a-dual-boot-raid-1-partition-on-an-uefi%5D | |
| sudo -s | |
| apt-get -y install mdadm | |
| apt-get -y install grub-efi-amd64 | |
| sgdisk -z /dev/sda | |
| sgdisk -z /dev/sdb | |
| sgdisk -n 1:0:+100M -t 1:ef00 -c 1:"EFI System" /dev/sda | |
| sgdisk -n 2:0:+8G -t 2:fd00 -c 2:"Linux RAID" /dev/sda |
TL;DR
Install Postgres 9.5, and then:
sudo pg_dropcluster 9.5 main --stop
sudo pg_upgradecluster 9.3 main
sudo pg_dropcluster 9.3 mainI want to build a system which uses rules. These rules will change hourly (i.e. "this rule is effective from 2pm to 6pm"). The rules must support arbitrarily complex logic on just 2-3 pre-defined variables and result in a boolean:
item.a > 10 && item.b == 0 || item.category == FOOTWEARThese rules will be executed hundreds of times per second so I can't afford the overhead of plain old eval. I want to reload the current effective ruleset from the database hourly, precompile each rule's logic string and execute it via the quickest method possible. It might look something like this:
class Rule
| #atualizado para Tuxedo OS 3 ( Ubuntu 22.04 ) | |
| # como usar: | |
| # Clique ali em cima no botão raw | |
| # salve o arquivo no seu disco. | |
| # abra o terminal na pasta onde vc baixou o arquivo. | |
| # de permissão de execução chmod +x post_install.sh | |
| # rode: | |
| # ./post_install.sh | |
| # coloque sua senha |