Skip to content

Instantly share code, notes, and snippets.

View vivekrk1992's full-sized avatar

Vivek RK vivekrk1992

  • Data2sense
  • coimbatore
View GitHub Profile
@vivekrk1992
vivekrk1992 / gist:716e89d9420545e8f15a889b90314d44
Created May 7, 2021 13:17
Flutter push notification using djanog
Django > Firebase > flutter using
set django fcm url
https://github.com/xtrinch/fcm-django
first import the tracsaction contrl
```
from django.db import transaction
```
then code like this
```
@api_view(['POST'])
```
pip install --pre gql[all]
or if use zsh
pip install --pre gql\[all\]
```
from gql import gql, Client
from gql.transport.aiohttp import AIOHTTPTransport
@vivekrk1992
vivekrk1992 / pg_hba.conf
Created February 20, 2021 06:45
Server database allow all connection
file location
/etc/postgresql/12/main
# add this line to end of the file
host all all 0.0.0.0/0 md5
@vivekrk1992
vivekrk1992 / Linux Download gz file and install
Last active November 20, 2020 18:59
Linux Download gz file and install
# remove previously install one
sudo rm -rf /opt/Postman/
# extract file and put into opt dir
sudo tar xvf Postman-<your version>.tar.gz -C /opt/
# Link the excutable
sudo ln -sf /opt/Postman/app/Postman /usr/bin/postman
# create file postman.desktop
sudo update-alternatives --config java
sudo update-alternatives --config javac
java and javac both are selected different version so thats the problem
choose same version in both
then rerun ionic it will works
@vivekrk1992
vivekrk1992 / coc-settings.json
Last active April 21, 2020 10:50
NVIM Django config
/home/vivek/.config/nvim/coc-settings.json
{
"python.pythonPath": "~/Software/virtualenv/pinin/bin/python3",
"python.pythonPath": "~/Software/virtualenv/ezeecorp/bin/python3",
"python.linting.pylintEnabled": false,
"python.linting.enabled": false,
"python.jediEnabled": false
}
@vivekrk1992
vivekrk1992 / pg_hba.conf
Last active February 14, 2020 09:07
Postgresql local network access all system
host aavin aavin 192.168.0.1/30 md5
host all all 0.0.0.0/0 trust # access for all database and user
file locaion mac
Library/ApplicationSupport/Postgres/var-11/
@vivekrk1992
vivekrk1992 / 01npm install
Last active December 11, 2019 11:44
ionic4-google map
ionic cordova plugin add cordova-plugin-googlemaps
npm install --save @ionic-native/core@latest @ionic-native/google-maps@latest
ref url
```
https://github.com/ionic-team/ionic-native-google-maps/blob/master/documents/README.md
```
# Cannot add task ':app:processDebugGoogleServices' as a task with that name already exists.
### remove android platform
ionic cordova platform rm android
file plugins/cordova-plugin-fcm/src/android/FCMPlugin.gradle
dependencies {
compile 'com.google.firebase:firebase-core:10.+'
}