<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>
-
URL
<The URL Structure (path only, no root url)>
-
Method:
cd ~ | |
##If you want to install OpenJDK | |
#sudo apt-get update | |
#sudo apt-get install openjdk-8-jre-headless -y | |
###Or if you want to install Oracle JDK, which seems to have slightly better performance | |
sudo add-apt-repository ppa:webupd8team/java | |
sudo apt-get update | |
sudo apt-get install oracle-java8-installer |
Question: How do we safely compare a date to an unknown value within a Rails application?
Example: params[:date_field] > 2.years.ago
Doing a bit of digging, it looks like 2.years.ago
returns an instance of ActiveSupport::TimeWithZone
.
In ruby, whenever you do a comparison of any sort ruby will follow the rules outlined in the Comparable
module of stdlib.
ActiveSupport::TimeWithZone
will create a instance of Time
in a UTC time zone when doing comparisons with ActiveSupport::TimeWithZone#<=>
.
#!/bin/bash | |
echo "starting check sidekiq" | |
process=`cat /path-to/sidekiq.pid` | |
processConfirmation=`ps aux | awk '{print $2 }' | grep $process` | |
if [ -z $processConfirmation ] | |
then | |
echo "oops! not running... restarting sidekiq" |
Please visit https://asistencia.in/blogs/1-mysql-5-5-installation-guide
Thank you
$ sudo apt-get update
$ sudo apt-get install unzip wget
$ wget https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip
$ unzip ngrok-stable-linux-amd64.zip
$ sudo mv ./ngrok /usr/bin/ngrok
$ ngrok