Skip to content

Instantly share code, notes, and snippets.

let's learn some swift

Rahul V Ramesh rahulvramesh

let's learn some swift
View GitHub Profile
View scheduling mysql backups with laravel.php
To manually dump the database you can run the following one-liner code
mysqldump -u[user] -p[pass] [db] > [file_path]
But what if you want to automate the process, here are the steps:
1. Setup cron entry to your server
* * * * * php /path-to-your-project/artisan schedule:run >> /dev/null 2>&1
2. Create a command BackupDatabase by running the following code:
rahulvramesh / MongoDB Replica Set / docker-compose / mongoose transaction with persistent volume

This will guide you through setting up a replica set in a docker environment using.

  • Docker Compose
  • MongoDB Replica Sets
  • Mongoose
  • Mongoose Transactions

Thanks to for helping with their docker-compose file!

View translate.json
"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 / sshtunnel.go
Created Oct 15, 2020 — forked from svett/sshtunnel.go
SSH tunnelling in Golang
View sshtunnel.go
package main
import (

Keybase proof

I hereby claim:

  • I am rahulvramesh on github.
  • I am 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 /
Created Sep 19, 2020 — forked from Kocisov/
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

View tncstyle.css
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 /
Created Jun 23, 2020 — forked from myusuf3/
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 / etc-init.d-hello-world
Created Jun 23, 2020 — forked from josephspurrier/etc-init.d-hello-world
/etc/init.d Script for Go Application
View etc-init.d-hello-world
# chkconfig: 35 95 05
# description: Hello world application.
# Run at startup: sudo chkconfig hello-world on
# Load functions from library
. /etc/init.d/functions
You can’t perform that action at this time.