Skip to content

Instantly share code, notes, and snippets.

View darmawan01's full-sized avatar
🏠
Working from home

Dz darmawan01

🏠
Working from home
  • Indonesia
View GitHub Profile
@darmawan01
darmawan01 / docker-compose.yml
Last active June 5, 2023 05:28
Matrix Synapse
version: '3'
networks:
synapse:
driver: bridge
services:
certbot:
image: certbot/certbot
command: certonly --webroot --webroot-path=/var/www/html --email [email protected] --agree-tos --no-eff-email -d my-domain.com
@darmawan01
darmawan01 / time.go
Created December 22, 2022 13:06
Custom Time Marshal/Unmarshal from unix milisecond
package types
import (
"database/sql/driver"
"fmt"
"strconv"
"strings"
"time"
)
@darmawan01
darmawan01 / docker-compose.yml
Last active August 3, 2022 09:50
HAPI FHIR Server Docker Compose
version: "3"
networks:
fhir-server:
driver: bridge
services:
fhir:
container_name: fhir-server
image: hapiproject/hapi:v5.3.0
@darmawan01
darmawan01 / README.md
Last active July 27, 2021 05:12
Mostly Used Command

Docker

Copy some file to docker container

docker cp <file_to_copy> <container_name>:<dir_destination_in_docker>

PostgreSQl

Restore pg sql dump to docker container

docker container exec <container_db> psql -U <db_user> <db_name> -f <backup>.sql

@darmawan01
darmawan01 / dokcer-compose.yml
Created September 5, 2019 16:20
Simple docker compose for static web
version "3"
sites:
image: nginx:1.15.8-alpine
restart: always
working_dir: /usr/share/nginx/html
ports:
- "2000:80"
volumes:
- ./proxy.conf:/etc/nginx/conf.d/default.conf
@bradtraversy
bradtraversy / docker-help.md
Last active November 15, 2024 17:06
Docker Commands, Help & Tips

Docker Commands, Help & Tips

Show commands & management commands

$ docker

Docker version info

@herpiko
herpiko / klas-pki-playground.md
Last active January 2, 2020 16:18
💻 🔨 :neckbeard: PKI

Membuat sertifikat self-signed

openssl req -newkey rsa:2048 -nodes -keyout key.pem -x509 -days 365 -out cert.pem

Melihat isi sertifikat

openssl x509 -in cert.pem -text

PEM dan DER

package main
import (
"log"
"net/http"
"sync"
"github.com/garyburd/redigo/redis"
"github.com/gorilla/websocket"
uuid "github.com/satori/go.uuid"
@mattetti
mattetti / multipart_upload.go
Last active August 21, 2024 04:52
Example of doing a multipart upload in Go (golang)
package main
import (
"bytes"
"fmt"
"io"
"log"
"mime/multipart"
"net/http"
"os"