Skip to content

Instantly share code, notes, and snippets.

git clone -b v3.5.0 https://github.com/etcd-io/etcd.git
cd etcd
# Run etcd server.
./bin/etcd
go mod tidy
go run main.go
# redis is awesome
package main
import (
"fmt"
"github.com/go-redis/redis"
)
func NewRedisClient() *redis.Client {
return redis.NewClient(&redis.Options{
Addr: "localhost:6379",
mkdir ~/my-golang-redis-app
cd ~/my-golang-redis-app
touch main.go
go mod init github.com/romanitalian/redis_vs_etc_with_go
go mod tidy
tree
.
docker pull redis
docker run - name redis-test-instance -p 6379:6379 -d redis
#!/bin/bash
# README
# --------------------
# chmod u+x wasm_init.sh
# ./wasm_init.sh example.com
# --------------------
PROJECT_NAME="$1"
if [ -z "$PROJECT_NAME" ]
@romanitalian
romanitalian / django_init.sh
Created June 19, 2021 18:34
make Django project from scratch (in one command).
#!/bin/bash
# README
# --------------------
# chmod u+x django_init.sh
# ./django_init.sh my-super-project.com main
# --------------------
SETTINGS_APP="core"

CentOS 7

$ yum install memcached
$ yum install libmemcached

Edit config (optional):

$ vim /etc/sysconfig/memcached

UBUNTU

Install memcached on UBUNTU

$ sudo apt install memcached
$ sudo apt install libmemcached-tools