Skip to content

Instantly share code, notes, and snippets.

View mrtdeh's full-sized avatar

Morteza Dehghani mrtdeh

View GitHub Profile
@nirev
nirev / elasticsearch.md
Created September 15, 2020 13:06
Elasticsearch Data Streams
@Hakky54
Hakky54 / openssl_commands.md
Last active May 23, 2024 12:07 — forked from p3t3r67x0/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
@c16a
c16a / main.go
Created August 6, 2017 13:41
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"
)
@ammario
ammario / ipint.go
Last active May 22, 2024 16:19
Golang IP <-> int conversion
func ip2int(ip net.IP) uint32 {
if len(ip) == 16 {
return binary.BigEndian.Uint32(ip[12:16])
}
return binary.BigEndian.Uint32(ip)
}
func int2ip(nn uint32) net.IP {
ip := make(net.IP, 4)
binary.BigEndian.PutUint32(ip, nn)
@altermarkive
altermarkive / merge_subtitles_with_video.py
Last active February 16, 2024 14:01
Python script for merging video files (AVI, MP4, MKV) with subtitles (SRT) using ffmpeg (on Windows it will also handle font configuration)
# Moved to: https://github.com/altermarkive/python-experiments/tree/master/merge-subtitles-with-video
@mrliptontea
mrliptontea / sublime-text-3-windows-shortcuts.md
Last active March 30, 2024 04:14 — forked from TheShrike/gist:6111200
Sublime Text 3 - Useful Shortcuts (Windows)

Sublime Text 3 - Useful Shortcuts (Windows)

General

Shortcut Description
Ctrl+Shift+P command prompt
Ctrl+Alt+P switch project
Ctrl+P go to file
Ctrl+G go to line
@Ocramius
Ocramius / README.md
Last active January 22, 2024 00:09
`__invoke` vs `function` vs `Closure`
@developius
developius / README.md
Last active April 25, 2024 22:15
Setup SSH keys for use with GitHub/GitLab/BitBucket etc

Create a new repository, or reuse an existing one.

Generate a new SSH key:

ssh-keygen -t rsa -C "your_email@example.com"

Copy the contents of the file ~/.ssh/id_rsa.pub to your SSH keys in your GitHub account settings (https://github.com/settings/keys).

Test SSH key:

@didasy
didasy / helpers.go
Last active February 28, 2020 06:36
Golang Slice Helper Functions
/*
A bunch of slice helper functions
All of these modify the original slice
*/
package main
import (
"fmt"
)
@maximilien
maximilien / tar_helper.go
Created October 31, 2014 16:53
Creating tarball in Golang
package tar_helper
import (
"archive/tar"
"compress/gzip"
"errors"
"fmt"
"io"
"io/ioutil"
"os"