Skip to content

Instantly share code, notes, and snippets.

@hieulm
hieulm / chi.go
Created March 8, 2024 12:35 — forked from alexaandru/chi.go
Chi-like syntactic sugar layer on top of stdlib http.ServeMux
// Chi-like syntactic sugar layer on top of stdlib http.ServeMux.
package main
import (
"net/http"
"slices"
)
type (
middleware func(http.Handler) http.Handler
[
{
"name": "ayu"
},
{
"name": "ElixirSyntax"
},
{
"name": "LSP-elixir"
},
@hieulm
hieulm / README.md
Last active September 14, 2020 20:06
Ruby on Rails Documents

Setup working environment

# install rbenv
# install ruby
# install rails
# install debuger
$ gem install ruby-debug-ide debase
@hieulm
hieulm / README.md
Last active April 28, 2020 16:57
generate self ssl cert
@hieulm
hieulm / .gitlab-ci.yml
Last active April 22, 2022 15:34
Gitlab CI/CD, Bitbucket, Docker Swarm
image: docker:19.03.5
services:
- docker:19.03.5-dind
before_script:
- docker info
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
stages:
@hieulm
hieulm / README.md
Last active December 30, 2019 01:37
docker swarm instruction
@hieulm
hieulm / README.md
Last active January 13, 2020 19:02
Nginx Config

Instructions

touch /etc/nginx/site-availables/jenkins.example.com
# Update jenkins.example.com with content in gist
ln -s /etc/nginx/site-availables/jenkins.example.com /etc/nginx/site-enables/jenkins.example.com
nginx -t
systemctl restart nginx
# Config SSL with Let's encrypt & certbot
certbot --nginx -d jenkins.example.com -d www.jenkins.example.com
@hieulm
hieulm / hhvm.hdf
Created August 24, 2019 18:22 — forked from betawax/hhvm.hdf
Laravel HHVM config
Server {
Port = 8080
SourceRoot = /var/www/foobar/public/
}
VirtualHost {
* {
Pattern = .*
RewriteRules {
* {
@hieulm
hieulm / disable_touchpad.sh
Created July 3, 2019 02:29
disable_touchpad
#!/bin/bash
declare -i ID
ID=`xinput list | grep -Eo 'Touchpad\s*id\=[0-9]{1,2}' | grep -Eo '[0-9]{1,2}'`
xinput set-prop $ID "Device Enabled" 0
echo "Touchpad has been disabled."