Skip to content

Instantly share code, notes, and snippets.

View cr3a7ure's full-sized avatar

Goutis Dimitrios cr3a7ure

View GitHub Profile
@tkapias
tkapias / fzf-img.sh
Last active September 5, 2023 21:29
fzf-img.sh - Image fuzzy finder with preview using fzf and ueberzug
#!/usr/bin/env bash
# This is just an example how ueberzug can be used with fzf.
# Copyright (C) 2019 Nico Bäurer
# Copyright (C) 2022 Tomasz Kapias
# - Updated:
# - optional PATH as only option
# - internal FDfind query for images
# - display SVGs after caching a converted png
# - Imagemagick's identify infos as header with margin
@cr3a7ure
cr3a7ure / consumer.sh
Created January 19, 2021 11:59 — forked from dongjinleekr/consumer.sh
Kafka benchmark commands
## Consumer Throughput: Single consumer thread, no compression
## Consumer Throughput: 3 consumer thread, no compression
bin/kafka-consumer-perf-test.sh --topic benchmark-3-3-none \
--zookeeper kafka-zk-1:2181,kafka-zk-2:2181,kafka-zk-3:2181 \
--messages 15000000 \
--threads 1
@alecjacobson
alecjacobson / denoise.sh
Last active July 31, 2023 10:05
Remove background audio noise from a video clip via the command line (using ffmpeg and sox)
#!/bin/bash
if [ -z "$2" ];then
echo 'USAGE:
denoise input.mov output.mov
OR
denoise input.mov output.mov [ambient-noise-start-time] [ambient-noise-duration] [sox-noisered-amount] [sox-norm-param]
@bruvv
bruvv / PIHOLE+UNBOUND.md
Last active June 21, 2024 14:33
Setup Pihole + Unbound + DNS over TLS on ubuntu 20.02 LTS

Swap

First enable swap just incase

sudo fallocate -l 2G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
sudo cp /etc/fstab /etc/fstab.bak
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
sudo sysctl vm.swappiness=10
@checco
checco / postgres-owner-grants.sql
Last active June 14, 2023 15:19
How to change OWNER for DATABASE, SCHEMA or TABLE on AWS RDS PostgreSQL. An how to REASSIGN owner for all objects on AWS RDS PostgreSQL
--
-- Change database owner
--
ALTER DATABASE "db_name" OWNER TO user;
--
-- List schemas
--
@avishayp
avishayp / Dockerfile
Created September 25, 2018 19:02
Add non-root user for alpine linux
# non root user example for alpine
#
# usage:
# $ docker build --build-arg "USER=someuser" --tag test .
# $ docker run --rm test
FROM alpine
ARG USER=default
ENV HOME /home/$USER
@ntwobike
ntwobike / LPIC-101 400-1
Last active July 7, 2024 16:01
Sample questions for LPIC -101-400 part-1
QUESTION 1
Which SysV init configuration file should be modified to disable the ctrl-alt-delete key combination?
A. /etc/keys
B. /proc/keys
C. /etc/inittab
D. /proc/inittab
E. /etc/reboot
QUESTION 2
Which of the following information is stored within the BIOS? (Choose TWO correct answers.)
@emmanueltissera
emmanueltissera / git-apply-patch.md
Created September 13, 2017 02:34
Generate a git patch for a specific commit

Creating the patch

git format-patch -1 <sha>
OR
git format-patch -1 HEAD

Applying the patch

git apply --stat file.patch # show stats.
git apply --check file.patch # check for error before applying

@Warchant
Warchant / sonarqube-docker-compose.yml
Last active May 28, 2024 20:24
docker-compose file to setup production-ready sonarqube
version: "3"
services:
sonarqube:
image: sonarqube
expose:
- 9000
ports:
- "127.0.0.1:9000:9000"
networks:
@michitux
michitux / export-git-patches.sh
Last active March 11, 2023 21:50
Export a series of git commits into patches.
# Inspired by http://blog.worldofcoding.com/2013/03/formatting-git-patches-for-partially.html
# This calls git log to get a list of commits that affect a certain file pattern and then exports each of them into a file
# If the exported commits shall be limited to these files, another pathspec could be added in the second git log call.
# The code is split into several lines to make it more readable, but all ";" are there such that all line breaks could be removed.
c=0;
git log --oneline --reverse -- your/pathspec.* |cut -d' ' -f1 | while read a;
do
c=$[c+1];