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 / SDK_setup
Created July 19, 2017 13:09
Android SDK setup for ionic-3
download and install android studio
Open android studio click configure icon, select SDK Manager
Download needed SDK platform
add your path to terminal ~/.bash_profile
export PATH=${PATH}:/Users/donny/Documents/android/sdk/platform-tools:/Users/donny/Documents/android/sdk/tools
export ANDROID_HOME=/Users/donny/Documents/android/sdk
@vivekrk1992
vivekrk1992 / 0 install.txt
Last active May 4, 2018 11:24
Create Token Authentication in Django using ionic 3 login and logout
install rest frame work
```
pip install djangorestframework
```
activate source
```
pip install django-otp
```
@vivekrk1992
vivekrk1992 / 01. shell plus setup
Last active June 6, 2023 16:40
configure jupyter with django project and connect to remote server
1. activate your django virtual environment
2. navigate your project directory (not necessary)
3. install ipython via pip
```
pip install ipython
```
4. install django extension via pip
```
pip install django-extensions
```
@vivekrk1992
vivekrk1992 / gist:2273d04a7bd80ff6ca940fa30d149c80
Created May 3, 2018 10:19
Serve angular website access from another system in same network
ng serve --host=192.168.0.113
@vivekrk1992
vivekrk1992 / django_with_mezzanine
Created May 3, 2018 12:24
configur django with mezzanine
clone mezzanine any directory
```
https://github.com/stephenmcd/mezzanine.git
```
create you virtualenv for your project
```
virtualenv -p /usr/local/bin/python3.6 virtual_project_name
```
activate your source
@vivekrk1992
vivekrk1992 / gist:9922a893bb6c9291dfadedd68299c481
Created May 4, 2018 05:03
Create role and user in postgres
```
psql -h localhost -d dummy;
```
```
dummy=# create role ammaindia with CREATEDB CREATEROLE CREATEUSER LOGIN PASSWORD 'ammaindia';
```
```
create database dabase_name owner ammaindia
@vivekrk1992
vivekrk1992 / gist:3ff94203ee59c8ff99abe31f5e53fdac
Created June 10, 2018 08:04
Django email does not send from production server(Digital Ocean)
google block email from low security application, so we want to enable access email from low security application
login as your email and click the below link and and test your application
now email send successfully
https://accounts.google.com/DisplayUnlockCaptcha
and make sure you enable access to lower security applications.
@vivekrk1992
vivekrk1992 / gist:b4c984d19e3ffd8f72d9259924d44190
Created June 12, 2018 06:54
Upgrade Angular project 4.4 to 6
```
npm install -g @angular/cli
```
```
npm install @angular/cli
```
```
ng update @angular/cli
@vivekrk1992
vivekrk1992 / gps_timestamp_to_datetime.py
Created July 1, 2018 07:59
Convert GPS timestamp to datetime using python
gps timestamp
```
t = '1530430370491'
```
```
gps_time_stamp = (int(t) / 1000)
time_stamp = datetime.fromtimestamp(gps_time_stamp)
```