Skip to content

Instantly share code, notes, and snippets.

View jayanthkmr's full-sized avatar
🚫
Breaking things

Jayanth Kumar jayanthkmr

🚫
Breaking things
View GitHub Profile
@jayanthkmr
jayanthkmr / Scylla_Data_Modeling.cql
Last active November 11, 2021 07:56
Advance Data Modeling with Scylla
DROP KEYSPACE test ;
CREATE KEYSPACE test WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '1'} AND durable_writes = true;
USE test;
CREATE TABLE heartrate_v10 (
pet_chip_id uuid,
owner uuid,
time timestamp,
heart_rate int,
PRIMARY KEY (pet_chip_id, time)
@jayanthkmr
jayanthkmr / sh
Created June 22, 2020 07:14 — forked from lobermann/sh
Install wkhtmltopdf on headless ubuntu 18 vps
wget https://downloads.wkhtmltopdf.org/0.12/0.12.5/wkhtmltox_0.12.5-1.bionic_amd64.deb
apt-get install fontconfig libxrender1 xfonts-75dpi xfonts-base
dpkg -i wkhtmltox_0.12.5-1.bionic_amd64.deb
@jayanthkmr
jayanthkmr / ghost.conf
Created June 6, 2020 04:16 — forked from deflume1/ghost.conf
Sample ghost supervisor file
[program:ghost]
command = npm start --production
directory = /var/www/ghost
user = ghost
autostart = true
autorestart = true
stdout_logfile = /var/log/supervisor/ghost.log
stderr_logfile = /var/log/supervisor/ghost_err.log
environment = NODE_ENV="production"
@jayanthkmr
jayanthkmr / sane-caching.nginx.conf
Created June 2, 2020 13:01 — forked from philipstanislaus/sane-caching.nginx.conf
Sample Nginx config with sane caching settings for modern web development
# Sample Nginx config with sane caching settings for modern web development
#
# Motivation:
# Modern web development often happens with developer tools open, e. g. the Chrome Dev Tools.
# These tools automatically deactivate all sorts of caching for you, so you always have a fresh
# and juicy version of your assets available.
# At some point, however, you want to show your work to testers, your boss or your client.
# After you implemented and deployed their feedback, they reload the testing page – and report
# the exact same issues as before! What happened? Of course, they did not have developer tools
# open, and of course, they did not empty their caches before navigating to your site.
@jayanthkmr
jayanthkmr / readme.md
Created May 4, 2020 21:35 — forked from shapiromatron/readme.md
Celery parallel tasks

Celery task canvas

Demonstration of a task which runs a startup task, then parallelizes multiple worker tasks, and then fires-off a reducer task.

If passing results around would be important, then could use a chord instead for task2 and task3.

@jayanthkmr
jayanthkmr / pyenv+virtualenv.md
Created June 29, 2019 05:53 — forked from eliangcs/pyenv+virtualenv.md
Cheatsheet: pyenv, virtualenvwrapper, and pip

Cheatsheet: pyenv, virtualenvwrapper, and pip

Installation (for Mac OS)

Install pyenv with brew

brew update
brew install pyenv
@jayanthkmr
jayanthkmr / serialize.py
Created June 8, 2019 08:29
Code to do serialization
from datetime import datetime, date
from decimal import Decimal
from enum import Enum
class SerializationUtil(object):
@staticmethod
def object_to_dict(obj):
return SerializationUtil._dump(obj)
@jayanthkmr
jayanthkmr / apache.conf
Created May 27, 2019 08:18 — forked from rambabusaravanan/apache.conf
SPA - Apache, Nginx Configuration for Single Page Application like React.js on a custom path
# To host on root path just use "<Location />" for http://mydomainname.in
# To host on non-root path use "<Location /myreactapp>" for http://mydomainname.in/mypath
# If non-root path, don't forgot to add "homepage": "/myreactapp" in your app's package.json
<VirtualHost *:80>
ServerName mydomainname.in
DirectoryIndex index.html
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
@jayanthkmr
jayanthkmr / nginx-ssl-config
Created May 21, 2019 16:03 — forked from apollolm/nginx-ssl-config
Nginx Configuration with multiple port apps on same domain, with SSL.
# the IP(s) on which your node server is running. I chose port 3000.
upstream app_geoforce {
server 127.0.0.1:3000;
}
upstream app_pcodes{
server 127.0.0.1:3001;
}
@jayanthkmr
jayanthkmr / default.conf
Created May 20, 2019 10:14 — forked from wahyudibo/default.conf
Install nginx, php 70 (with fpm), and mysql in Mac OS X
server {
listen 80;
server_name localhost;
root /Users/wahyudibo/Projects/mylabs/php/nginx;
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#