Skip to content

Instantly share code, notes, and snippets.

View repodevs's full-sized avatar

Edi Santoso repodevs

View GitHub Profile
@aaronsaderholm
aaronsaderholm / i3-gaps-install.sh
Last active January 1, 2021 18:52 — forked from doubtingben/gist:60a228c06a48a5b8601ea5e94e4ab22c
Install i3-gaps on Ubuntu 16.04
#!/usr/bin/env bash
# Install i3-gaps on Ubuntu 16
set -e
set -x
sudo apt-get update && sudo apt-get -y upgrade
sudo apt-get install -y libxcb1-dev libxcb-keysyms1-dev libpango1.0-dev libxcb-shape0-dev libxcb-util0-dev libxcb-icccm4-dev libyajl-dev libstartup-notification0-dev libxcb-randr0-dev libev-dev libxcb-cursor-dev libxcb-xinerama0-dev libxcb-xkb-dev libxkbcommon-dev libxkbcommon-x11-dev autoconf xutils-dev dh-autoreconf
mkdir -p $HOME/repos
cd $HOME/repos
@JanKoppe
JanKoppe / README.md
Last active December 4, 2020 03:58
nginx basic auth with different users for read/write

This nginx configuration allows to restrict access via different methods to separate users.

This is very useful for private docker registries, where you want every member of your team to be able to fetch Docker images, but only some users (admins and CI users) to push new images to the registry.

Example:

  • User write can use GET, POST, PUT, DELETE and everything else.
  • User read can only use GET and HEAD.
  • Anonymous users are denied access entirely.
@kenvac
kenvac / pgbouncer.ini
Created November 7, 2017 09:50
basic pgbouncer configuration with odoo
;; database name = connect string
;;
;; connect string params:
;; dbname= host= port= user= password=
;; client_encoding= datestyle= timezone=
;; pool_size= connect_query=
[databases]
odoo1 = host=127.0.0.1 auth_user=odoo dbname=odoo1 port=5432
odoo2 = host=127.0.0.1 auth_user=odoo dbname=odoo2 port=5432
odoo3 = host=127.0.0.1 auth_user=odoo port=5432 dbname=odoo3
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@shr00mie
shr00mie / jupyterlab_install.sh
Last active July 20, 2019 10:41
Jupyterlab Install + Service on Ubuntu Server 16.04LTS
#!/bin/bash
# variables
# listening address for jupyter. set to localhost if only accessing locally.
read -p $'\n\e[32mServer static IP address\e[m: ' ipAddress
# Set this either as parent or direct working directory of the project you want to work on.
read -p $'\n\e[32mProject Parent Directory\e[m: ' WorkingDirectory
echo -e "\n...\e[32mGenerating random token\e[m...\n"
@serithemage
serithemage / aws-study-resource.md
Last active June 10, 2025 01:45
AWS ํ•™์Šต ์ž๋ฃŒ์ง‘

AWS ํ•™์Šต ๋งํฌ์ง‘ ์‹œ๋ฆฌ์ฆˆ

  • AWS ํŠธ๋ ˆ์ด๋‹ ๋ฐ ์ž๊ฒฉ์ฆ ์†Œ๊ฐœ http://bit.ly/aws-tnc-intro
  • AWS ํ•™์Šต ์ž๋ฃŒ์ง‘ http://bit.ly/aws-study-resource
  • AWS ๊ณต์ธ ์†”๋ฃจ์…˜์Šค ์•„ํ‚คํ…ํŠธ - ์–ด์†Œ์‹œ์—์ดํŠธ ์ˆ˜ํ—˜ ๊ฐ€์ด๋“œ http://bit.ly/sacertguide
  • AWS ๊ณต์ธ ๊ฐœ๋ฐœ์ž - ์–ด์†Œ์‹œ์—์ดํŠธ ์ˆ˜ํ—˜ ๊ฐ€์ด๋“œ http://bit.ly/devcertguide
  • AWS ๋ณด์•ˆ ๊ด€๋ จ ์ปจํ…์ธ  ๋ชจ์Œ์ง‘ http://bit.ly/secontents
  • AWS ๊ธฐ๋ฐ˜ ๋น…๋ฐ์ดํ„ฐ ํ•™์Šต์ž๋ฃŒ์ง‘ http://bit.ly/bdonaws
  • AWS ๋”ฅ๋Ÿฌ๋‹ ํ•™์Šต ์ž๋ฃŒ ๋ชจ์Œ์ง‘ http://bit.ly/dlonaws
  • 2019๋…„ re:Invent ์—์„œ ๊ณต๊ฐœ๋œ AI/ML๊ด€๋ จ ์„œ๋น„์Šค ์†Œ๊ฐœ http://bit.ly/2019-ml-recap
package main
import (
"github.com/jinzhu/gorm"
_ "github.com/jinzhu/gorm/dialects/mysql"
"github.com/satori/go.uuid"
"fmt"
)
type Email struct {
@saurabhnanda
saurabhnanda / tuning-postgres-zfs.md
Last active August 2, 2023 06:06
Tuning Postgres + ZFS

Tuning ZFS + Postgres to outperform EXT4 + Postgres

Please refer to ZFS 2-3x slower than EXT4 to see how ZFS defaults + Postgres defaults severely underperform EXT4 defaults + Postgres defaults (and also to know more about the system on which these benchmarks were performed). This page documents how to tune ZFS + Postgres to give better performance for the tpcb-like benchmark.

BIG FAT WARNING

Please do not copy these settings blindly because I am myself not clear on why/how these settings had the impact they did. For example, I cannot explain why full_page_writes=off independently did not give that much boost, nor did an optimized PG configuration. However, putting both of them together gave a 2-4x boost compared to baseline numbers.

Benchmark results

@mlaitinen
mlaitinen / main.py
Created July 30, 2019 15:12
Odoo 12 Prometheus instrumentation
##############################################################################
#
# Author: Miku Laitinen / Avoin.Systems
# Copyright 2019 Avoin.Systems
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
@jgould22
jgould22 / Dockerfile
Last active May 26, 2025 09:09
Postgres 15 - Alpine - pg_partman with pg_jobmon
FROM postgres:15-alpine
LABEL maintainer="Jordan Gould <[email protected]>"
# Based on https://github.com/andreaswachowski/docker-postgres/blob/master/initdb.sh
ENV PG_JOBMON_VERSION v1.4.1
ENV PG_PARTMAN_VERSION v4.7.1
# Install pg_jobmon
RUN set -ex \
\