Skip to content

Instantly share code, notes, and snippets.

View mrtdeh's full-sized avatar

Morteza Dehghani mrtdeh

View GitHub Profile
@houoop
houoop / get-tomorrow-date.js
Created April 28, 2013 03:44
js get tomorrow date
new Date(new Date().getTime() + 24 * 60 * 60 * 1000)
@rxaviers
rxaviers / gist:7360908
Last active June 21, 2024 18:06
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@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"
@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"
)
@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:

@Ocramius
Ocramius / README.md
Last active January 22, 2024 00:09
`__invoke` vs `function` vs `Closure`
@mrliptontea
mrliptontea / sublime-text-3-windows-shortcuts.md
Last active June 15, 2024 16:22 — 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
@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
@ammario
ammario / ipint.go
Last active May 25, 2024 21:43
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)
@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"
)