Skip to content

Instantly share code, notes, and snippets.

I may be slow to respond.

Devan devansvd

I may be slow to respond.
  • Chennai, India
Block or report user

Report or block devansvd

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View s3 bucket custom domain
# redirect to
server {
listen 80;
listen 443 ssl;
server_name ~^(.*)\.example\.com$;
ssl_certificate /etc/nginx/certs/fullchain.pem;
devansvd /
Last active Oct 14, 2019
Ways to retrive token from keycloak

Master Realm Level Access:

curl -X POST 'http://localhost:8080/auth/realms/master/protocol/openid-connect/token' \
 -H "Content-Type: application/x-www-form-urlencoded" \
 -d "username=xxxxx" \
 -d 'password=xxxxx' \
 -d 'grant_type=password' \
 -d 'client_id=admin-cli'
View .bash_profile
# Get the Git branch
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
# Custom bash prompt
# Includes custom character for the prompt, path, and Git branch name.
# Source: and
devansvd / tmux.conf
Created Jun 12, 2019 — forked from spicycode/tmux.conf
The best and greatest tmux.conf ever
View tmux.conf
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000
View elasticsearch-cheetsheet.txt
ElasticSearch Cheat sheet
Create an Index via SENSE
PUT /movies
"settings" : {
"number_of_shards" : 5,
"number_of_replicas" : 1
View auth-interceptor-example.ts
abstract class AuthService {
// Subject tracks the current token, or is null if no token is currently
// available (e.g. refresh pending).
private subject = new BehaviorSubject<string|null>(null);
readonly refreshToken: Observable<any>;
readonly token: Observable<string>;
constructor() {
// refreshToken, when subscribed, gets the new token from the backend,
devansvd / redis_cheatsheet.bash
Created Dec 13, 2018 — forked from LeCoupa/redis_cheatsheet.bash
Redis Cheatsheet - Basic Commands You Must Know --> UPDATED VERSION -->
View redis_cheatsheet.bash
# Redis Cheatsheet
# All the commands you need to know
redis-server /path/redis.conf # start redis with the related configuration file
redis-cli # opens a redis prompt
# Strings.
View angular-serve-static-proxy.js
//Angular 2 above application static server
const http = require('http');
const express = require('express');
const proxy = require('http-proxy-middleware');
const path = require('path');
const app = express();
devansvd /
Created Oct 8, 2018 — forked from pbojinov/
Two way iframe communication- Check out working example here:

Two way iframe communication

The main difference between the two pages is the method of sending messages. Recieving messages is the same in both.


Send messages to iframe using iframeEl.contentWindow.postMessage Recieve messages using window.addEventListener('message')


View my_vs _code_settings.json
"window.zoomLevel": 0,
"workbench.iconTheme": "vscode-great-icons",
"workbench.startupEditor": "newUntitledFile",
"workbench.editor.enablePreview": false,
"workbench.editor.enablePreviewFromQuickOpen": false,
"editor.wordWrap": "off",
"git.enabled": false,
"git.autofetch": false,
"telemetry.enableTelemetry": false,
You can’t perform that action at this time.