Skip to content

Instantly share code, notes, and snippets.

View dtsuper3's full-sized avatar
🏠
Working from home

Deepak Thapa dtsuper3

🏠
Working from home
View GitHub Profile
@dtsuper3
dtsuper3 / IndexedDB101.js
Created January 13, 2023 22:00 — forked from cauerego/IndexedDB101.js
Very Simple IndexedDB Example
// quite untested, adapted from BigstickCarpet's gist, attempt to make it simpler to use
function openIndexedDB (fileindex) {
// This works on all devices/browsers, and uses IndexedDBShim as a final fallback
var indexedDB = window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB || window.shimIndexedDB;
var openDB = indexedDB.open("MyDatabase", 1);
openDB.onupgradeneeded = function() {
var db = {}
@dtsuper3
dtsuper3 / Dockerfile
Created January 1, 2021 05:53 — forked from jcavat/Dockerfile
docker-compose with php/mysql/phpmyadmin/apache
FROM php:7.1.2-apache
RUN docker-php-ext-install mysqli
@dtsuper3
dtsuper3 / ssh.md
Created July 12, 2020 17:48 — forked from bradtraversy/ssh.md
SSH & DevOps Crash Course Snippets

SSH Cheat Sheet

This sheet goes along with this SSH YouTube tutorial

Login via SSH with password (LOCAL SERVER)

$ ssh brad@192.168.1.29

Create folder, file, install Apache (Just messing around)

$ mkdir test

$ cd test

@dtsuper3
dtsuper3 / docker_wordpress.md
Created July 12, 2020 17:47 — forked from bradtraversy/docker_wordpress.md
Docker Compose FIle For Wordpress, MySQL & phpmyadmin

Wordpress & Docker

This file will setup Wordpress, MySQL & PHPMyAdmin with a single command. Add the code below to a file called "docker-compose.yaml" and run the command

$ docker-compose up -d

# To Tear Down
$ docker-compose down --volumes

MySQL Cheat Sheet

Help with SQL commands to interact with a MySQL database

MySQL Locations

  • Mac /usr/local/mysql/bin
  • Windows /Program Files/MySQL/MySQL version/bin
  • Xampp /xampp/mysql/bin

Add mysql to your PATH

@dtsuper3
dtsuper3 / rethinkdb_cheat_sheet.MD
Created July 12, 2020 17:47 — forked from bradtraversy/rethinkdb_cheat_sheet.MD
RethinkDB Query Cheat Sheet

RethinkDB Cheat Sheet

Create database

r.dbCreate('mydb')

List databases

MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database

@dtsuper3
dtsuper3 / node_nginx_ssl.md
Created July 12, 2020 17:44 — forked from bradtraversy/node_nginx_ssl.md
Node app deploy with nginx & SSL

Node.js Deployment

Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt

1. Sign up for Digital Ocean

If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a

2. Create a droplet and log in via ssh

I will be using the root user, but would suggest creating a new user

@dtsuper3
dtsuper3 / node_redis_cache.js
Created July 12, 2020 17:42 — forked from bradtraversy/node_redis_cache.js
Node.js & Redis Caching
const express = require('express');
const fetch = require('node-fetch');
const redis = require('redis');
const PORT = process.env.PORT || 5000;
const REDIS_PORT = process.env.PORT || 6379;
const client = redis.createClient(REDIS_PORT);
const app = express();
@dtsuper3
dtsuper3 / docker-help.md
Created February 11, 2019 12:05 — forked from bradtraversy/docker-help.md
Docker Commands, Help & Tips

Docker Commands, Help & Tips

Show commands & management commands

$ docker

Docker version info