Skip to content

Instantly share code, notes, and snippets.

View ervinb's full-sized avatar

Ervin Barta ervinb

View GitHub Profile
#!/bin/bash
regions=(local ca-central-1 eu-central-1 ap-southeast-1 ap-northeast-1 us-east-1)
image_name_base="cache-bench"
image_sizes_in_mb=(64 512 1024)
dockerfile="Dockerfile.sample"
log_file=docker-bench.log
@ervinb
ervinb / boost-your-microphone-above-the-Mac-OS-limit-and-improve-voice-quality.md
Last active January 10, 2024 09:01
How to boost the microphone volume on Mac above the OS limit. Useful for quality microhpones, which are too quiet out-of-the box.

How to boost your microphone above the Mac OS limit

If you just bought a good mic but got dissapointed how quiet it is, this post will sort you out. My Blue Snowball iCE was way too quiet out of the box and I've used this procedure to make it sound great.

mic-vst-light

First we'll set up BlackHole, but the focus will be on Element, which is a great VST host application. It enables the manipulation of an input singnal through VST, AU and its built-in plugins. This is a good alternative to AU Lab, which actually works. We will also install AU Lab for it's plugins however.

The rest of the chain is just passing on a hot potato.

Migrate a Fedora 27 installation to a NVMe SSD drive with rsync

Prepare partitions

Create partitions with GParted:

Device Label File system Flag
/dev/nvme01p1 fedora-nvme-root ext4 n\a
/dev/nvme01p2 fedora-nvme-boot ext4 n\a

How to install MS Core fonts on Fedora

  • install dependencies
$ sudo dnf install -y rpm-build ttmkfdir
  • prep the work space
@ervinb
ervinb / maven-333.sh
Created July 1, 2015 11:25
Install Maven 3.3.3 on Ubuntu 14.04
#!/bin/sh
sudo apt-get purge -y maven
if ! [ -e .semaphore-cache/apache-maven-3.3.3-bin.tar.gz ]; then (cd .semaphore-cache; curl -OL http://mirror.olnevhost.net/pub/apache/maven/maven-3/3.3.3/binaries/apache-maven-3.3.3-bin.tar.gz); fi
sudo tar -zxf .semaphore-cache/apache-maven-3.3.3-bin.tar.gz -C /usr/local/
sudo ln -s /usr/local/apache-maven-3.3.3/bin/mvn /usr/bin/mvn
echo "Maven is on version `mvn -v`"
@ervinb
ervinb / kustomize_vars.md
Created August 24, 2022 09:05 — forked from hermanbanken/kustomize_vars.md
Kustomize Vars example

This was initially posted in an kubernetes-sigs/kustomize issue.

We are using Kustomize's vars feature. Initially we didn't understand how to use it for our purpose, but it is a 100% fit. One example is our Ingress resource, which looks like this:

# file: base/ingress.yaml
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  name: services
@ervinb
ervinb / rebind-ubuntu-keys.md
Last active July 3, 2021 12:24
Rebind Ubuntu keyboard

Find the key you want to change

  • run xev which opens a new window
  • when you type the key that you want to rebind, the terminal from which xev is run will display all the info about that key
  • look for the keycode section
  • gather all the keycodes this way

Rebind the key

  • run xmodmap -e "keycode = " where expression is the value (Escape, Control_L, etc.)

Keybase proof

I hereby claim:

  • I am ervinb on github.
  • I am ervinbarta (https://keybase.io/ervinbarta) on keybase.
  • I have a public key ASA_MQwCuYlxNuiNMXzcK4pNt5h_R5K02MWbBmWYEe1xmgo

To claim this, I am signing this object:

@ervinb
ervinb / how-to-download-gzipped-file-request-node.js
Created January 3, 2020 07:53
How to download gzipped file with request and Node.js
const request = require('request-promise-native');
const os = require('os');
const fs = require('fs-extra');
const res = await request.get('http://link.to/some-gzipped-image.jpg', {
gzip: true,
resolveWithFullResponse: true, // optional, otherwise replace `res.body` with just `res` below
encoding: null
});
@ervinb
ervinb / Jenkinsfile
Created October 30, 2019 09:34 — forked from jonico/Jenkinsfile
Example for a full blown Jenkins pipeline script with multiple stages, kubernetes templates, shared volumes, input steps, injected credentials, heroku deploy, sonarqube and artifactory integration, Docker containers, multiple Git commit statuses, PR merge vs branch build detection, REST API calls to GitHub deployment API, stage timeouts, stage c…
#!groovy
import groovy.json.JsonOutput
import groovy.json.JsonSlurper
def label = "mypod-${UUID.randomUUID().toString()}"
podTemplate(label: label, yaml: """
spec:
containers:
- name: mvn
image: maven:3.3.9-jdk-8-alpine