| 1. Cost Effective Resource selection | |
| 2. Match Supply and demand | |
| 3. Awareness of spend | |
| 4. Optimize | |
| << Cost Effective Resource Selection >> | |
| Provision to current needs with an eye to future. | |
| Right Sizing. | |
| Use data to choose purchase option. (on-demand or spot) | |
| Optimize by Regions, AZ and Edge (global infrastructure) |
This gist will collects all issues we solved with Rails 5.2 and Webpacker
# Last few parameters(--skip-* part) is only my habbit not actully required
$ rails new <project_name> --webpack=stimulus --database=postgresql --skip-coffee --skip-test| /* | |
| 360 degree Image Slider v2.0.4 | |
| http://gaurav.jassal.me | |
| Copyright 2015, [email protected] | |
| Dual licensed under the MIT or GPL Version 3 licenses. | |
| */ | |
| /* | |
| 360 degree Image Slider v2.0.4 |
| { | |
| "editor.multiCursorModifier": "ctrlCmd", | |
| "editor.snippetSuggestions": "top", | |
| "editor.formatOnPaste": true, | |
| "editor.fontFamily" : "Fira Code", | |
| "editor.fontLigatures": true, | |
| "emmet.triggerExpansionOnTab": true, | |
| "php.suggest.basic": false, | |
| "editor.autoIndent": true, | |
| "emmet.includeLanguages" : { |
If you're not familiar: What is fail2ban? fail2ban is an awesome linux service/monitor that scans log files (e.g. auth.log for SSH) for potentially malicious behavior. Once fail2ban is tripped it will ban users for a specified duration by adding rules to Iptables. If you're unfamiliar with fail2ban Chris Fidao has a wonderful (& free!) series about security including setting up fail2ban here.
Recently Laravel released a new feature in 5.1 to throttle authentication attempts by simply adding a trait to your authentication controller. The Laravel throttle trait uses the inputted username, and IP address to throttle attempts. I love seeing this added to a framework out of the box, but what about some of our other apps not built on Laravel? Like a WordPress login? Or even an open API etc.? Ultimately,
| # activerecord-3.0.0/lib/active_record/connection_adapters/mysql_adapter.rb | |
| # Maps logical Rails types to MySQL-specific data types. | |
| def type_to_sql(type, limit = nil, precision = nil, scale = nil) | |
| return super unless type.to_s == 'integer' | |
| case limit | |
| when 1; 'tinyint' | |
| when 2; 'smallint' | |
| when 3; 'mediumint' | |
| when nil, 4, 11; 'int(11)' # compatibility with MySQL default |
| # Command Line to run from terminal | |
| # Logs result to file s3_backup.log | |
| # Command will run in the background | |
| s3cmd sync -v /path/to/folder/ s3://s3-bucket/folder/ > s3_backup.log 2>&1 & | |
| # Crontab command to sync folder to S3 | |
| # Command will run 1am every day and logs result to /root/s3_backup.log | |
| 0 1 * * * /usr/bin/s3cmd sync -rv /path/to/folder/ s3://s3-bucket/folder/ >> /root/s3_backup.log |