Skip to content

Instantly share code, notes, and snippets.

I may be slow to respond.

Devan devansvd

I may be slow to respond.
  • Earth
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
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,
View 1-handlebars-cheatsheet.hbs
Handlebars es un sistema de plantillas web semantico iniciado por Yehuda Katz en el 2010.
Handlebars.js es una extensión de Mustache, y además de renderear plantillas propias de Handlebars,
puede renderear plantillas Mustache.
1. Expresiones.
1.1 Uso básico.
devansvd / .js
Created Mar 19, 2018
callback to promise example
View .js
const getCourses = () => {
return new Promise( (resolve, reject) => {
Bucket: 'your-bucket-here',
Key: 'your-file.json'
}, function (err, data){
if (err !== null){
devansvd /
Created Mar 4, 2018 — forked from cecilemuller/
How to setup Let's Encrypt for Nginx on Ubuntu 16.04 (including IPv6, HTTP/2 and A+ SLL rating)

How to setup Let's Encrypt for Nginx on Ubuntu 16.04 (including IPv6, HTTP/2 and A+ SLL rating)

There are two main modes to run the Let's Encrypt client (called Certbot):

  • Standalone: replaces the webserver to respond to ACME challenges
  • Webroot: needs your webserver to serve challenges from a known folder.

Webroot is better because it doesn't need to replace Nginx (to bind to port 80).

In the following, we're setting up HTML is served from /var/www/mydomain, and challenges are served from /var/www/letsencrypt.

You can’t perform that action at this time.