Skip to content

Instantly share code, notes, and snippets.

View glats's full-sized avatar
😺
Im on #cat-v mostly

Juan Cuzmar glats

😺
Im on #cat-v mostly
View GitHub Profile
@glats
glats / main.go
Last active December 6, 2019 15:07 — forked from 3n21c0/main.go
A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies
package main
import (
"context"
"flag"
"fmt"
"log"
"net/http"
"os"
"os/signal"
@glats
glats / vimrc
Created October 15, 2019 01:27
if has("autocmd")
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
endif
@glats
glats / mailpile
Last active September 11, 2019 02:56
mailpile init with screen(pretty dirty)
#!/bin/bash
### BEGIN INIT INFO
# Provides: mailpile
# Required-Start: $local_fs $remote_fs $network $syslog
# Required-Stop: $local_fs $remote_fs $network $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start/stop mailpile daemon
### END INIT INFO
# ——————————————————————————
quiet loglevel=0 vga=current console=tty2 rd.udev.log_priority=0 vt.global_cursor_default=0 mitigations=off
@glats
glats / wetty
Last active September 11, 2019 02:55
#!/bin/sh
### BEGIN INIT INFO
# Provides: wetty
# Required-Start: $local_fs $remote_fs $network $syslog
# Required-Stop: $local_fs $remote_fs $network $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start wetty daemon
# Description: Start/stop wetty
### END INIT INFO
log_format sniffing '$remote_addr - $remote_user [$time_local] '
'"$request" $status $body_bytes_sent '
'"$http_referer" "$http_user_agent" "$http_x_forwarded_for" "$request_body" "$http_Authorization" "$http_x_duid" "$http_x_ver" "$upstream_http_x_rqid"';
upstream backend {
server server.local:7003;
server server.local:7003;
}
server {
listen 80;
server_name server2.local;
{
"git.confirmSync": false,
"window.zoomLevel": 0,
"workbench.editor.enablePreview": false,
"explorer.openEditors.visible": 0,
"workbench.startupEditor": "newUntitledFile",
"files.exclude": {
"**/.git": true,
"**/.DS_Store": true,
"**/.history": true,
#!/bin/bash
# generated vscodium --list-extensions | xargs -L 1 echo code --install-extension
PLUGINS=(formulahendry.code-runner
octref.vetur
PKief.material-icon-theme
will-stone.plastic)
for i in "${PLUGINS[@]}"
do
vscodium --install-extension "$i"
@glats
glats / 99-libinput-mouse.conf
Created June 23, 2019 04:47
from my asus rog
# /usr/share/X11/xorg.conf.d/99-libinput.conf
Section "InputClass"
Identifier "libinput touchpad catchall"
Driver "libinput"
MatchProduct "ELAN1200:00 04F3:3045 Touchpad"
MatchIsTouchpad "on"
Option "Tapping" "True"
Option "DisableWhileTyping" "True"
Option "NaturalScrolling" "True"
Option "AccelProfile" "adaptive"
git submodule foreach git pull origin develop