Skip to content

Instantly share code, notes, and snippets.

View barisvelioglu's full-sized avatar
🤓

Barış Velioğlu barisvelioglu

🤓
View GitHub Profile
@barisvelioglu
barisvelioglu / gist:a48ee12cc79d4b7520d618b401c98f3c
Created October 26, 2021 16:02
Change the location of docker images when using Docker Desktop on WSL2 with Windows 10 Home?
The WSL 2 docker-desktop-data vm disk image would normally reside in: %USERPROFILE%\AppData\Local\Docker\wsl\data\ext4.vhdx
Follow the following to relocate it to other drive/directory, with all existing docker data preserved (tested against Docker Desktop 2.3.0.4 (46911), and continued to work after updating the 3.1.0 (51484)):
First, shut down your docker desktop by right click on the Docker Desktop icon and select Quit Docker Desktop
Then, open your command prompt:
wsl --list -v
You should be able to see, make sure the STATE for both is Stopped.(wsl --shutdown)
@remcohendriks
remcohendriks / values.yaml
Last active March 16, 2023 00:54
Gitlab-runner helm values for arm64
## GitLab Runner Image
##
## By default it's using gitlab/gitlab-runner:alpine-v{VERSION}
## where {VERSION} is taken from Chart.yaml from appVersion field
##
## ref: https://hub.docker.com/r/gitlab/gitlab-runner/tags/
##
# image: gitlab/gitlab-runner:alpine-v11.6.0
## Specify a imagePullPolicy
@miry
miry / 01_extract_crt.rb
Last active September 3, 2023 06:32
Extract certificate from the kubernetes config.
require 'optparse'
require 'yaml'
require 'base64'
options = {
config_path: File.join(ENV['HOME'], '.kube', 'config'),
write_dir: File.join(ENV['HOME'], '.kube')
}
OptionParser.new do |opts|
@kjnilsson
kjnilsson / async_consumer.cs
Last active January 24, 2021 07:17
RabbitMQ .NET client async consumer example
using System;
using System.Threading.Tasks;
using RabbitMQ.Client;
using RabbitMQ.Client.Events;
namespace ConsoleApplication
{
public class Program
{
public static void Main(string[] args)

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@JoelBCarter
JoelBCarter / prometheus.yml
Created October 10, 2016 20:10
Sample Prometheus scrape config for obtianing metrics from Kubernetes pods via DNS & Headless Service
scrape_configs:
- job_name: 'your_kubernetes_pod'
dns_sd_configs:
- refresh_interval: 15s
names:
- {headless-service-name}.default.svc.cluster.local
relabel_configs:
# Change default port we get from DNS (0) to expected port ({your_pod_port})
- source_labels: [__address__]
action: replace
@jlinoff
jlinoff / walker.go
Created September 26, 2016 16:20
go example that shows how to walk a directory using a regular expression filter and collect files that match
// This example demonstrates how to use go to walk a directory
// and filter the contents by using filepath.Walk with
// variables in the external scope to provide the filter and
// to capture the file names.
//
// To build:
// go build walk.go
// Usage:
// walk <pattern> <files>
//