Skip to content

Instantly share code, notes, and snippets.

View mrtdeh's full-sized avatar

Morteza Dehghani mrtdeh

View GitHub Profile
@mrtdeh
mrtdeh / admin.sql
Last active April 14, 2024 06:58 — forked from Hikingyo/admin.sql
create admin user with all privileges on mysql/mariadb
CREATE USER 'admin'@'localhost' IDENTIFIED BY 'some_pass';
GRANT ALL PRIVILEGES ON *.* TO 'admin'@'localhost' WITH GRANT OPTION;
FLUSH PRIVILEGES;
## remote connection - not secure
CREATE USER 'admin'@'%' IDENTIFIED BY 'some_pass';
GRANT ALL PRIVILEGES ON *.* TO 'admin'@'%' WITH GRANT OPTION;
FLUSH PRIVILEGES;
DELETE FROM mysql.user WHERE User='root' AND Host NOT IN ('localhost', '127.0.0.1', '::1');
@mrtdeh
mrtdeh / openssl_commands.md
Created August 7, 2023 06:20 — forked from Hakky54/openssl_commands.md
Some list of openssl commands for check and verify your keys

OpenSSL 🔐

Install

Install the OpenSSL on Debian based systems

sudo apt-get install openssl
@mrtdeh
mrtdeh / notes.md
Created June 27, 2023 10:24 — forked from inecmc/notes.md
How to run multiple Redis instances on Ubuntu 16.04

Create the directory for the new instance

$ sudo install -o redis -g redis -d /var/lib/redis2

Create a new configuration file

$ sudo cp -p /etc/redis/redis.conf /etc/redis/redis2.conf
@mrtdeh
mrtdeh / main.go
Created June 17, 2023 06:13 — forked from c16a/main.go
Concurrent MySQL with Golang
package main
import "database/sql"
import (
"fmt"
_ "github.com/go-sql-driver/mysql"
"github.com/satori/go.uuid"
"math/rand"
"sync"
)
@mrtdeh
mrtdeh / elasticsearch.md
Created August 23, 2022 10:39 — forked from nirev/elasticsearch.md
Elasticsearch Data Streams
@mrtdeh
mrtdeh / cookie_jar_golang.go
Last active December 23, 2017 20:39 — forked from varver/cookie_jar_golang.go
Login to a website with this golang code using persistent cookies or cookie jar .
@mrtdeh
mrtdeh / steps.md
Created July 6, 2017 19:15 — forked from undefinedzain/steps.md
Add Custom Facade on Laravel 5.3
  1. Create a custom class

?>