app/controllers/sessions_controller.rb
#
# SessionsController - Controller for user session
#
# @author alameen
#
class SessionsController < Devise::SessionsController
def create
resource = warden.authenticate!(scope: resource_name,
{"lastUpload":"2019-09-30T06:02:30.812Z","extensionVersion":"v3.4.3"} |
.bg-white { | |
background-color: #ffffff; | |
color: black; | |
} | |
.bg-none { | |
background-color: transparent; | |
} | |
.btn-center { |
app/controllers/sessions_controller.rb
#
# SessionsController - Controller for user session
#
# @author alameen
#
class SessionsController < Devise::SessionsController
def create
resource = warden.authenticate!(scope: resource_name,
Undo a local merge (not comited/pushed yet)
git reset --hard <last-commit-id>
Above command will move to the state of the last commit, ignoring all the changes.
If you want to push after a hard reset, use -f
option
git push origin <branch-name> -f
To checkout by folder
git checkout master -- db/migrate
###How to enable a service
As an example, to enable Apache web server in Debian, do the following -
update-rc.d apache2 defaults
... this will enable the Apache web server to start in the default run levels of 2,3,4 and 5. Of course, you can do it explicitly by giving the run levels instead of the defaults keyword as follows:
update-rc.d apache2 start 20 2 3 4 5 . stop 80 0 1 6 .
The above command modifies the sym-links in the respective /etc/rcX.d directories to start or stop the service in the destined runlevels. Here X stands for a value of 0 to 6 depending on the runlevel. One thing to note here is the dot (.) which is used to terminate the set which is important. Also 20 and 80 are the sequence codes which decides in what order of precedence the scripts in the /etc/init.d/ directory should be started or stopped.
https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-monit
check process pt-rpush with pidfile /srv/www/packagetracker/shared/pids/rpush.pid
start program = "/etc/init.d/pt-rpush start"
stop program = "/etc/init.d/pt-rpush stop"
#!/bin/sh
###rpush - https://github.com/rpush/rpush
Follow the steps in rpush to add the gem to your rails project
####PushNotificationDevice
rails g model PushNotificationDevice device_type:integer:index device_token:string
class CreatePushNotificationDevices < ActiveRecord::Migration
Rspec ??
###Read again
###Gemfile
group :development, :test do
gem 'rspec-rails'
gem 'factory_girl_rails'
install android sdk | |
download android sdk alone | |
unzip it | |
move a safe folder(remember the path) | |
set the ANDROID_HOME | |
export ANDROID_HOME=/home/user/android-sdk-linux | |
export ANDROID_HOME=~/android-sdk-linux | |
export PATH=$ANDROID_HOME/tools:$PATH | |
export PATH=$ANDROID_HOME/platform-tools:$PATH |
####Install the whole package
sudo apt-get install postgresql postgresql-contrib
####Install pgAdmin III - a handy GUI for PostgreSQL
sudo apt-get install pgadmin3
####Setup
#####Login to postgres sql prompt
sudo -u postgres psql postgres
#####Change the postgres user password
\password postgres