Skip to content

Instantly share code, notes, and snippets.

View kholisrag's full-sized avatar

Kholis Respati Agum Gumelar kholisrag

  • Indonesia
  • 23:21 (UTC +07:00)
View GitHub Profile
@phoe
phoe / forever.md
Last active February 22, 2024 23:50
Forever Stable Branch

Forever Stable Branch

Stable branch, I can see you in the stable branch
See you again, I see you again
In my dreams, in my dreams, in my dreams, in my dreams

Morning light, I remember the morning li-i-i-i-ight
Outside my door (outside my door), I'll see you no more (see you no more)
In my dreams, in my dreams, in my dreams, in my dreams
>

@dragonsinth
dragonsinth / gcp-kube.go
Last active May 5, 2024 13:22
Connect to Google Kubernetes with GCP credentials and pure Golang
package main
import (
"context"
"encoding/base64"
"flag"
"fmt"
"log"
container "google.golang.org/api/container/v1beta1"
@kaatinga
kaatinga / How to arrange your work with private repositories properly.md
Last active April 30, 2024 09:01
How to fix 'fatal: could not read Username for 'https://gitlab.com': terminal prompts disabled'

Ops. https://gitlab.com': terminal prompts disabled

Ops. Username for 'https://codeberg.org':

Ops. etc

If you see this message, there is a short solution how to fix it here. In my case it appeared and it did not want to get fixed by many ways that are offered on the internet.

Some of the pieces of advice that did not work:

  1. Set git config --global --add credential.helper manager
#!/usr/bin/env bash
name=fooAlert-$RANDOM
url='http://localhost:9093/api/v1/alerts'
bold=$(tput bold)
normal=$(tput sgr0)
generate_post_data() {
cat <<EOF
[{
@makeittotop
makeittotop / vault_logrotate
Created September 9, 2019 05:16 — forked from soloradish/vault_logrotate
logrotate setting file for HashiCorp's Vault audit file
# Change the path below to your own audit log path.
/var/log/vault/audit.log {
rotate 30
daily
# Do not execute rotate if the log file is empty.
notifempty
missingok
compress
# Set compress on next rotate cycl to prevent entry loss when performing compression.
delaycompress
@bamoo456
bamoo456 / main.go
Last active August 8, 2023 07:41
[Golang] execute long running job and streaming the realtime output
func main() {
cmd := exec.Command("sh", "-c", "cd ../../bin/worker; ./run.sh")
// some command output will be input into stderr
// e.g.
// cmd := exec.Command("../../bin/master_build")
// stderr, err := cmd.StderrPipe()
stdout, err := cmd.StdoutPipe()
if err != nil {
fmt.Println(err)
}
@irvingpop
irvingpop / ssh_key.tf
Last active April 8, 2024 07:18
Terraform external data source example - dynamic SSH key generation
# ssh key generator data source expects the below 3 inputs, and produces 3 outputs for use:
# "${data.external.ssh_key_generator.result.public_key}" (contents)
# "${data.external.ssh_key_generator.result.private_key}" (contents)
# "${data.external.ssh_key_generator.result.private_key_file}" (path)
data "external" "ssh_key_generator" {
program = ["bash", "${path.root}/../ssh_key_generator.sh"]
query = {
customer_name = "${var.customer_name}"
customer_group = "${var.customer_group}"
@SeanSobey
SeanSobey / portainer.md
Last active April 7, 2024 18:46
Portainer Setup on Windows 10

Portainer on Windows 10

Here I have 2 methods for running portainer on windows, a quick, preferred method only requiring a fairly recent version of docker, or a more complicated method to try if that does not work.

Using host.docker.internal

This setup will let you run Portainer on windows by using the host.docker.internal endpoint (docker.for.win.localhost is depricated since docker version 3.2.1, but older versions may use this instead).

Please note:

@andreibosco
andreibosco / creative-cloud-disable.md
Last active January 3, 2024 02:37
disable creative cloud startup on mac
@plentz
plentz / nginx.conf
Last active April 24, 2024 11:15
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048