Skip to content

Instantly share code, notes, and snippets.

View dmitrymomot's full-sized avatar
🤨

Dmytro Momot dmitrymomot

🤨
View GitHub Profile
@dmitrymomot
dmitrymomot / rsa_util.go
Created March 27, 2023 17:43 — forked from miguelmota/rsa_util.go
Golang RSA encrypt and decrypt example
package ciphers
import (
"crypto/rand"
"crypto/rsa"
"crypto/sha512"
"crypto/x509"
"encoding/pem"
"log"
)
@dmitrymomot
dmitrymomot / change_primary_key.md
Created September 24, 2021 09:43 — forked from scaryguy/change_primary_key.md
How to change PRIMARY KEY of an existing PostgreSQL table?
-- Firstly, remove PRIMARY KEY attribute of former PRIMARY KEY
ALTER TABLE <table_name> DROP CONSTRAINT <table_name>_pkey;
-- Then change column name of  your PRIMARY KEY and PRIMARY KEY candidates properly.
ALTER TABLE <table_name> RENAME COLUMN <primary_key_candidate> TO id;
@craigmurray1120
craigmurray1120 / rest-api-code-generator-list.md
Last active November 18, 2022 09:54
List of REST API code generator
@adyliu
adyliu / rinkeby-peers-list.txt
Last active October 12, 2021 16:07
get the peers of rinkeby of ethereum
> console.log(admin.peers.map(function(e){return 'admin.addPeer("enode://'+e.id+'@'+e.network.remoteAddress+'");'}).sort().join('\n'))
admin.addPeer("enode://0db812a93f04c5d255d6b49e2982d682de95fb4d627cb71b1ae09c95ccd142cbfd1e4d81de8f6abd53d7039f71d1b76791637550b8457ccb75ab84924a3427a6@35.170.185.206:30303");
admin.addPeer("enode://15512c6ddd95ade68b6825c464cd076f1ef1b9ccd6675fc6c1a64d9131980e0219fe616c8878a7e9d815df96b6635d90ee2a4ec3a14ec88d4e27839d912f9186@35.236.199.169:30303");
admin.addPeer("enode://1f6dcd2e10a93b7373fd17a715d1a337f73a2a6807a358d2ab0bf9c9a70e78997df4d32468fa1886a8158a947ab44998fa6ca34c53c543bb557024ada2e687eb@34.203.75.150:30303");
admin.addPeer("enode://22745f606bf7846714bb55f0a98437e2b09da1928647965ef511d908392c4110e0a7709c2cc1630b48ff074cf0d519ede1d1b124a4f88aa21b794ddc0e7052e3@34.219.84.192:18546");
admin.addPeer("enode://2ca86aaa816920575eca798a30ee657dcc593a5420c20d129f9008ffe5432e54901f4f0846bb9a88ccde5d8531f14f22528b2ea314386815531f98c51c7818ff@18.234.144.172:30303");
admin.addP
@miguelmota
miguelmota / rsa_util.go
Last active July 24, 2024 08:34
Golang RSA encrypt and decrypt example
package ciphers
import (
"crypto/rand"
"crypto/rsa"
"crypto/sha512"
"crypto/x509"
"encoding/pem"
"log"
)
admin.addPeer("enode://da0c61fe14ba9da1a9835b59d811553d21787448724cfe6412bc17f0b14586df91826d8286b2137342d09a8631df5ea548cf301294b05657c2a90f9c3d526721@143.198.119.44:30303");
admin.addPeer("enode://3e2287c6caf363357efc600611ccb777e6997ef8b749b1f87e94d3a7d2b466bbefba163b0620c88804f18bc70cfbe68538720ac2644fc1c970848488cdca0c7a@143.198.114.251:30303");
admin.addPeer("enode://15ea76b5d30ce9eaabf6a9a8fe5ca0ff032534d296b5b8ca6e00a730d08a4aaa019077c382a6b2d08ebc7cf6f8eb888f5e00e0dd378798e3459a555538654370@157.230.6.79:30303");
admin.addPeer("enode://2e718763172902a8fa4bcdda45f77a5c2688de5230e184d154e4867922b8f6ad23e1016379715cb5f55f6c79060563f93896035e35dfb47361d08599d4908ae8@143.198.118.178:30303");
admin.addPeer("enode://9d45f21eeb37bd5555fac0c4094ae3d4d144d93e2313aeb891bf3054b0dcf6ca817961ed29ea1de00389b5c36dc6bbe9b00443e367b16ed8ba251cea6c242044@94.176.237.140:30303");
admin.addPeer("enode://2493b5b8407ccb1c448d7ad358e838066640f273442730caf80acde2fe98522b1d9dcebd2dc982efe44911a49779888fe72defc181c29596facff05e1
@peterhellberg
peterhellberg / graceful.go
Last active June 11, 2024 12:27
*http.Server in Go 1.8 supports graceful shutdown. This is a small example.
package main
import (
"context"
"log"
"net/http"
"os"
"os/signal"
"time"
)
@mpneuried
mpneuried / Makefile
Last active July 7, 2024 14:30
Simple Makefile to build, run, tag and publish a docker containier to AWS-ECR
# import config.
# You can change the default config with `make cnf="config_special.env" build`
cnf ?= config.env
include $(cnf)
export $(shell sed 's/=.*//' $(cnf))
# import deploy config
# You can change the default deploy config with `make cnf="deploy_special.env" release`
dpl ?= deploy.env
include $(dpl)
{
"ab":{
"name":"Abkhaz",
"nativeName":"аҧсуа"
},
"aa":{
"name":"Afar",
"nativeName":"Afaraf"
},
"af":{
@lukas-h
lukas-h / license-badges.md
Last active July 11, 2024 07:00
Markdown License Badges for your Project

Markdown License badges

Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.

Notes

  • The badges do not fully replace the license informations for your projects, they are only emblems for the README, that the user can see the License at first glance.

Translations: (No guarantee that the translations are up-to-date)