A way of storing lists in Ruby
names = ["Faisal", "Sara", "Jane"]
|# Tweaked Win10 Initial Setup Script|
|# Primary Author: Disassembler <email@example.com>|
|# Modified by: alirobe <firstname.lastname@example.org> based on my personal preferences.|
|# Version: 2.20.2, 2018-09-14|
|# Primary Author Source: https://github.com/Disassembler0/Win10-Initial-Setup-Script|
|# Tweaked Source: https://gist.github.com/alirobe/7f3b34ad89a159e6daa1/|
|# Tweak difference:|
|# @alirobe's version is a subset focused on safely disabling telemetry, some 'smart' features and 3rd party bloat ...|
What is a prototype-based language? It is a language of object-oriented programming in which behaviour (think inheritance) is performed by cloning existing objects (i.e. prototypes). It is also an
|# based on https://gist.github.com/twtw/5494223|
|# create systemd service file for rails/puma startup|
|# 0. [if required: rvm use ruby@default]|
|# 1. rvm wrapper default systemd rails|
|# 2. put this file in /etc/systemd/system/rails-puma.service|
|# 3. systemctl enable rails-puma|
|# 4. systemctl start rails-puma|
|Download the certificate with:|
|`wget -O config/rds-combined-ca-bundle.pem http://s3.amazonaws.com/rds-downloads/rds-combined-ca-bundle.pem`|
|Then connect with:|
Hello, visitors! If you want an updated version of this styleguide in repo form with tons of real-life examples… check out Trellisheets! https://github.com/trello/trellisheets
“I perfectly understand our CSS. I never have any issues with cascading rules. I never have to use
!important or inline styles. Even though somebody else wrote this bit of CSS, I know exactly how it works and how to extend it. Fixes are easy! I have a hard time breaking our CSS. I know exactly where to put new CSS. We use all of our CSS and it’s pretty small overall. When I delete a template, I know the exact corresponding CSS file and I can delete it all at once. Nothing gets left behind.”
You often hear updog saying stuff like this. Who’s updog? Not much, who is up with you?
#Simple Authentication with Bcrypt
This tutorial is for adding authentication to a vanilla Ruby on Rails app using Bcrypt and has_secure_password.
The steps below are based on Ryan Bates's approach from Railscast #250 Authentication from Scratch (revised).
You can see the final source code here: repo. I began with a stock rails app using
rails new gif_vault
|For other language: Instead of `ace/mode/ruby`, Use|
|Markdown -> `ace/mode/markdown`|
|Python -> `ace/mode/python`|
|C/C++ -> `ace/mode/c_cpp`|
|Java -> `ace/mode/java`|
|Scala- -> `ace/mode/scala`|
With Heroku's JRuby support you may have already seen that you can run TorqueBox Lite on Heroku. But, that only gives you the web features of TorqueBox. What about scheduled jobs, backgroundable, messaging, services, and caching?
With a small amount of extra work, you can now run the full TorqueBox (minus STOMP support and clustering) on Heroku as well! I've successfully deployed several test applications, including the example Rails application from our Getting Started Guide which has a scheduled job, a service, and uses backgroundable and messaging.
This example uses TorqueBox 3.0.2, but the instructions may work with other TorqueBox versions.