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
function countryToFlag(isoCode) {
return typeof String.fromCodePoint !== 'undefined'
? isoCode
.toUpperCase()
.replace(/./g, (char) => String.fromCodePoint(char.charCodeAt(0) + 127397))
: isoCode;
}
// From https://bitbucket.org/atlassian/atlaskit-mk-2/raw/4ad0e56649c3e6c973e226b7efaeb28cb240ccb0/packages/core/select/src/data/countries.js
const countries = [
https://www.digitalocean.com/community/tutorials/how-to-set-up-laravel-nginx-and-mysql-with-docker-compose
https://github.com/cypress-io/cypress-example-recipes
match start and end index as same:- regex = /^(a|e|i|o|u).*\1$/
@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