Skip to content

Instantly share code, notes, and snippets.

Work with csv sheets (allow access to files)
open -a "Google Chrome" --args --allow-file-access-from-files --incognito
npm install -g vue-cli --first time installation of npm vue-cli
Create new project:
vue init webpack-simple <vueprojname> --creates a new vue project with the template as webpack-simple
? (vueprojname) --confirm project name and other details.
npm install
npm run dev
@shilpavijay
shilpavijay / Cassandra
Last active May 18, 2017 05:59
Cassandra
CREATE KEYSPACE "test" WITH replication = {'class': 'SimpleStrategy', 'replication_factor' : 3};EXIT
use test;
describe tables;
To exit cqlsh: EXIT
CASSANDRA QUERY PARSER:
-------------------------
1. Download https://github.com/Stratio/cassandra-lucene-index
Ensure lucene-index version and Cassandra versions are the same.
@shilpavijay
shilpavijay / mezzanine and Cartridge
Last active December 28, 2016 11:40
Mezzanine/Cartridge
Packages needed:
1. mezzanine (CMS)
2. south (for DB migrations)
3. django-compressor (for dealing static files)
4. cartridge (for shopping cart)
Creating a new project:
- delete manage.py and folders (everything except readme.md) from the django project
- $ mezzanine-project -a cartridge <project_name>
@shilpavijay
shilpavijay / flask
Last active January 18, 2018 11:17
Flask/ SQLAlchemy/ flask-angular
$ export FLASK_APP=hello.py --linux
$ set FLASK_APP=hello.py --windows CMD
$ python -m flask run
SSH:
ssh-keygen -t rsa
enter passphrase.
copy content of .ssh/id_rsa.pub:
clip < ~/.ssh/id_rsa.pub
creating user:
adduser shilpa
gpasswd -a shilpa root
gpasswd -a shilpa sudo
@shilpavijay
shilpavijay / Celery, RabbitMQ, flower
Last active March 15, 2018 08:44
Celery, RabbitMQ, flower
$ sudo rabbitmqctl add_user myuser mypassword
$ sudo rabbitmqctl add_vhost myvhost
$ sudo rabbitmqctl set_user_tags myuser mytag
$ sudo rabbitmqctl set_permissions -p myvhost myuser ".*" ".*" ".*"
$ sudo rabbitmqctl status
Start server:
$ sudo rabbitmq-server
OR
python -m SimpleHTTPServer
@shilpavijay
shilpavijay / Anaconda.txt
Last active February 5, 2022 13:14
Anaconda
conda search git //search if a package is present
conda env list //listing all environments
conda create --name dj_proj django //create a new environment
conda remove --name flowers --all //remove an environment
conda activate dj_proj //to get into the env
conda deactivate
//Rename a virtualenv
conda create --name new_name --clone old_name
conda remove --name old_name --all # or its alias: `conda env remove --name old_name`
@shilpavijay
shilpavijay / sqlite3
Created March 5, 2016 12:49
Sqlite 3 useful
.open <dbname>.db
sqlite3 <dbname>.db < <file>.sql