SSH into Root
$ ssh [email protected]
Change Root Password
| # This is a skeleton for testing models including examples of validations, callbacks, | |
| # scopes, instance & class methods, associations, and more. | |
| # Pick and choose what you want, as all models don't NEED to be tested at this depth. | |
| # | |
| # I'm always eager to hear new tips & suggestions as I'm still new to testing, | |
| # so if you have any, please share! | |
| # | |
| # @kyletcarlson | |
| # | |
| # This skeleton also assumes you're using the following gems: |
SSH into Root
$ ssh [email protected]
Change Root Password
| # Sidekiq interaction and startup script | |
| commands: | |
| create_post_dir: | |
| command: "mkdir -p /opt/elasticbeanstalk/hooks/appdeploy/post" | |
| ignoreErrors: true | |
| files: | |
| "/opt/elasticbeanstalk/hooks/appdeploy/post/50_restart_sidekiq.sh": | |
| mode: "000755" | |
| owner: root | |
| group: root |
| # Sidekiq interaction and startup script | |
| commands: | |
| create_post_dir: | |
| command: "mkdir -p /opt/elasticbeanstalk/hooks/appdeploy/post" | |
| ignoreErrors: true | |
| files: | |
| "/opt/elasticbeanstalk/hooks/appdeploy/post/50_restart_sidekiq.sh": | |
| mode: "000755" | |
| owner: root | |
| group: root |
| Using gem aws-sdk for a ror application for uploading images to s3 | |
| Uploading images to a fixed bucket with different folders for each object or application. | |
| The s3 keeps a limitation on the number of buckets creattion whereas there is no | |
| limitation for content inside a bucket. | |
| This code will upload image for a user to s3 using aws-sdk gem. The bucket and the image uploaded are made public | |
| so that the images uploaded are directly accessible. The input it takes is the image complete path | |
| where it is present, folder in which it should be uploaded and user_id for whom it should | |
| be uploaded. |
| function maxDepth() { | |
| var maxDep = 0, | |
| d, | |
| parents, | |
| myselector = 'ul, ol'; | |
| $(myselector).each( function(i) { | |
| parents = $(this).parents(myselector); | |
| d = parents ? parents.length + 1 : 1; | |
| maxDep = d > maxDep ? d : maxDep; |
| brew tap frnhr/homebrew-mariadb-connector-c-2 | |
| brew install frnhr/mariadb-connector-c-2/mariadb-connector-c | |
| env ARCHFLAGS="-arch x86_64" gem install mysql2 -v '0.3.20' -- --with-mysql-config=/usr/local/Cellar/mariadb-connector-c/2.2.2/bin/mariadb_config --with-ldflags=-L/usr/local/opt/openssl/lib --with-cppflags=-I/usr/local/opt/openssl/include |
This was written on 8 November, 2019. Some of the issues mentioned below were discovered and resolved with the help of Microsoft support staff, and will hopefully be fixed in the near future.
The steps below are mostly taken from this tutorial, Deploying your Rails + PostgreSQL app on Microsoft Azure, but have also been influenced by these two other tutorials: Create a Ruby on Rails App in App Service on Linux and Build a Ruby and Postgres app in Azure App Service on Linux.
The descriptions of each step are my own personal understanding. I'm not an Azure expert, so they may not be correct 100% of the time.
Rails Version Note: The versions u
o.......Open files, directories and bookmarks....................|NERDTree-o|
go......Open selected file, but leave cursor in the NERDTree.....|NERDTree-go|
t.......Open selected node/bookmark in a new tab.................|NERDTree-t|
T.......Same as 't' but keep the focus on the current tab........|NERDTree-T|
i.......Open selected file in a split window.....................|NERDTree-i|
gi......Same as i, but leave the cursor on the NERDTree..........|NERDTree-gi|
s.......Open selected file in a new vsplit.......................|NERDTree-s|
gs......Same as s, but leave the cursor on the NERDTree..........|NERDTree-gs|
O.......Recursively open the selected directory..................|NERDTree-O|