Skip to content

Instantly share code, notes, and snippets.

View rahulvramesh's full-sized avatar
💻
🚊

Rahul V Ramesh rahulvramesh

💻
🚊
View GitHub Profile
{
"search_for_markets_or_products": "Search for markets or products",
"top_markets": "Top Markets",
"ordered_by_nearby_first": "Ordered by Nearby first",
"trending_this_week": "Trending This Week",
"product_categories": "Product Categories",
"most_popular": "Most Popular",
"recent_reviews": "Recent Reviews",
"login": "Login",
"skip": "Skip",
@rahulvramesh
rahulvramesh / sshtunnel.go
Created October 15, 2020 03:09 — forked from iamralch/sshtunnel.go
SSH tunnelling in Golang
package main
import (
"log"
"bufio"
"time"
"os"
"fmt"
"io"
"net"

Keybase proof

I hereby claim:

  • I am rahulvramesh on github.
  • I am rahulvramesh (https://keybase.io/rahulvramesh) on keybase.
  • I have a public key whose fingerprint is 3814 E509 242F 527F A2A0 4172 E7A7 AFBB 9C91 D99D

To claim this, I am signing this object:

@rahulvramesh
rahulvramesh / next_nginx.md
Created September 19, 2020 13:58 — forked from kocisov/next_nginx.md
How to setup next.js app on nginx with letsencrypt

How to setup next.js app on nginx with letsencrypt

next.js, nginx, reverse-proxy, ssl

1. Install nginx and letsencrypt

$ sudo apt-get update
$ sudo apt-get install nginx letsencrypt

Also enable nginx in ufw

ol.lst-kix_list_7-0{list-style-type:none}.lst-kix_list_2-1>li{counter-increment:lst-ctn-kix_list_2-1}.lst-kix_list_21-8>li{counter-increment:lst-ctn-kix_list_21-8}ol.lst-kix_list_9-0.start{counter-reset:lst-ctn-kix_list_9-0 0}ol.lst-kix_list_13-4.start{counter-reset:lst-ctn-kix_list_13-4 0}.lst-kix_list_13-0>li{counter-increment:lst-ctn-kix_list_13-0}ol.lst-kix_list_20-2.start{counter-reset:lst-ctn-kix_list_20-2 0}ol.lst-kix_list_2-3.start{counter-reset:lst-ctn-kix_list_2-3 0}ol.lst-kix_list_7-5{list-style-type:none}ol.lst-kix_list_7-6{list-style-type:none}ol.lst-kix_list_7-7{list-style-type:none}ol.lst-kix_list_7-8{list-style-type:none}ol.lst-kix_list_7-1{list-style-type:none}ol.lst-kix_list_7-2{list-style-type:none}ol.lst-kix_list_7-3{list-style-type:none}ol.lst-kix_list_7-4{list-style-type:none}ol.lst-kix_list_23-2.start{counter-reset:lst-ctn-kix_list_23-2 0}.lst-kix_list_4-3>li{counter-increment:lst-ctn-kix_list_4-3}ol.lst-kix_list_17-1.start{counter-reset:lst-ctn-kix_list_17-1 0}.lst-kix_list_24-7>li{cou

from stackoverflow

The AccessManager will fire off two events that you can hook into. Firstly, when a token is near expiry, it will fire a token expired event. Hook into that event and when you receive it, generate a new token from your server. You can then set that new token in the AccessManager.

@rahulvramesh
rahulvramesh / delete_git_submodule.md
Created June 23, 2020 17:12 — forked from myusuf3/delete_git_submodule.md
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
@rahulvramesh
rahulvramesh / etc-init.d-hello-world
Created June 23, 2020 03:42 — forked from josephspurrier/etc-init.d-hello-world
/etc/init.d Script for Go Application
#!/bin/bash
#
# chkconfig: 35 95 05
# description: Hello world application.
# Run at startup: sudo chkconfig hello-world on
# Load functions from library
. /etc/init.d/functions
@rahulvramesh
rahulvramesh / free_email_provider_domains.txt
Created June 19, 2020 10:51 — forked from tbrianjones/free_email_provider_domains.txt
A list of free email provider domains. Some of these are probably not around anymore. I've combined a dozen lists from around the web. Current "major providers" should all be in here as of the date this is created.
1033edge.com
11mail.com
123.com
123box.net
123india.com
123mail.cl
123qwe.co.uk
126.com
150ml.com
15meg4free.com
@rahulvramesh
rahulvramesh / clean_code.md
Created May 25, 2020 05:26 — forked from wojteklu/clean_code.md
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules