Skip to main content

Posts

Showing posts from June, 2019

Redis & nginx configuration for websocket/actionCable

Start redis server => redis-server redis console => redis-cli view available databases => config get databases pubsub channels global* pubsub channels global_notification_2 pubsub channels global_notification pubsub channels * => Lists all the available channels pubsub numsub global_notification_2 => returns the number of subscribers From unix command line directly redis-cli PUBSUB CHANNELS redis-cli PUBSUB NUMSUB global_notification_2 [root@api prod-openmednet-api]# redis-cli PUBSUB CHANNELS 1) "_action_cable_internal" 2) "global_notification_2" [root@api prod-openmednet-api]# redis-cli PUBSUB CHANNELS global_notification_2 1) "global_notification_2" [root@api prod-openmednet-api]# redis-cli PUBSUB NUMSUB global_notification_2 1) "global_notification_2" 2) (integer) 2 NGINX configuration:  worker_processes   auto; worker_rlimit_nofile 500000;  #=> refer RLIM

Mac stuffs

vi command description 0 move to beginning of the current line $ move to end of line H move to the top of the current window (high) M move to the middle of the current window (middle) L move to the bottom line of the current window (low) 1G move to the first line of the file 20G move to the 20th line of the file G move to the last line of the file

Postgres points

Export sql data to file copy (select * from table-name) to '/tmp/cta.pl.list' in root dnf install postgresql-server postgresql-devel service postgresql start mkdir /home/pgdir chown postgres:postgres /home/pgdir -R chmod 777 /home/pgdir -R  su postgres initdb -D /home/pgdir pg_ctl -D /home/pgdir -l /home/pgdir/log start