gitlab-rails console
$ gitlab-rails console
User.where("created_at < ?", 60.days.ago).find_each do |user| if user.name.length != 10 puts user.name end end
User.where("length(name) = ?", 10).find_each do |user|
puts "#{user.id};#{user.name};#{user.email}"
end
User.where("length(username) = ? and length(name) = ?", 10, 10).find_each do |user|
puts "#{user.id};#{user.username};#{user.name};#{user.email}"
end
users = User.where("length(username) = ? and length(name) = ? and id >= ? and id != ?", 10, 10, 240, 734) users.find_each do |user| puts "#{user.id};#{user.username};#{user.name};#{user.email}" end
users = User.where("length(username) = ? and length(name) = ? and id >= ? and id != ?", 10, 10, 240, 734) users.find_each do |user| user.destroy end
emails = ["doox6paigu4M@doox6paigu4M.com", "eeThiel3eex9@eeThiel3eex9.com"] users = User.where("email in (?)", emails) users.find_each do |user| puts user.name end
NAS – openmediavault
openmediavault is the next generation network attached storage (NAS) solution based on Debian Linux. It contains services like SSH, (S)FTP, SMB/CIFS, DAAP media server, RSync, BitTorrent client and many more. Thanks to the modular design of the framework it can be enhanced via plugins.
Intel Xeon and Suspend to RAM
- Troubleshooting tips for Suspend-to-RAM
https://unix.stackexchange.com/questions/452282/troubleshooting-tips-for-suspend-to-ram
PostgreSQL users and roles
- Managing PostgreSQL users and roles
https://aws.amazon.com/pt/blogs/database/managing-postgresql-users-and-roles/ - How do I create another user with the same privileges as a master user for my Amazon RDS or Aurora DB instance that’s running PostgreSQL?
https://aws.amazon.com/pt/premiumsupport/knowledge-center/rds-aurora-postgresql-clone-master-user/ - Amazon RDS PostgreSQL: how to create user?
https://stackoverflow.com/questions/47249546/amazon-rds-postgresql-how-to-create-user
Developer Best Practices
- 10 Best Practices for Better RESTful API
https://medium.com/@mwaysolutions/10-best-practices-for-better-restful-api-cbe81b06f291
Debian troubleshoot
Package | Command |
lsof | /usr/bin/lsof |
procps | /bin/ps |
Aws instance scheduler
Como interrompo e inicio instâncias do Amazon EC2 em intervalos regulares usando o Lambda?
https://aws.amazon.com/pt/premiumsupport/knowledge-center/start-stop-lambda-cloudwatch/
Automate starting and stopping AWS instances
https://docs.aws.amazon.com/solutions/latest/instance-scheduler/welcome.html
Awslabs / AWS Instance Scheduler – Scheduler for Cross-Account and Cross-Region scheduling for EC2 and RDS instances
https://github.com/awslabs/aws-instance-scheduler
Microservice Architecture
- What are microservices?
https://microservices.io/index.html - Pattern: Microservice Architecture
https://microservices.io/patterns/microservices.html - Pattern: Monolithic Architecture
https://microservices.io/patterns/monolithic.html
Nvidia Mosaic – Linux
- How to configure MOSAIC on Linux
https://nvidia.custhelp.com/app/answers/detail/a_id/3580/~/how-to-configure-mosaic-on-linux
xorg.conf
Option "MetaModes" "1920x1080 +0+0, 1920x1080 +1920+0, 1920x1080 +0+1080, 1920x1080 +1920+1080"
- Archlinux – Nvidia Mosaic
https://wiki.archlinux.org/title/NVIDIA#Mosaic_mode
- NVIDIA Mosaic Technology – User’s Guide
https://images.nvidia.com/aem-dam/en-zz/Solutions/design-visualization/quadro-product-literature/NVMosaic-UG.pdf