Skip to content

Instantly share code, notes, and snippets.

View wooyey's full-sized avatar

Łukasz Kwiek wooyey

  • Byte Motion
  • Poland
View GitHub Profile
@wooyey
wooyey / .vimrc
Last active June 9, 2020 18:02
VIM Config
" Python formatting
au BufNewFile, BufRead *.py
\ set tabstop=4 |
\ set softtabstop=4 |
\ set shiftwidth=4 |
\ set textwidth=79 |
\ set expandtab |
\ set autoindent |
\ set fileformat=unix
@wooyey
wooyey / setup.sh
Last active April 6, 2020 18:05
Yubikey soft GPG
#!/bin/bash
WARNING='\033[5m\033[1mWARNING\033[0m'
sudo apt update -qq
sudo apt install -qq -y gnupg2 gnupg-agent dirmngr cryptsetup scdaemon pcscd secure-delete hopenpgp-tools yubikey-personalization
ENTROPY=$(cat /proc/sys/kernel/random/entropy_avail)
if [ $ENTROPY -lt 2000 ]; then
@wooyey
wooyey / Dockerfile
Last active April 8, 2020 19:19
Dockerfile apt install
FROM debian:stable-slim
RUN apt-get update -qq && apt-get install -y --no-install-recommends \
vim \
gnupg && \
rm -rf /var/lib/apt/lists/*
@wooyey
wooyey / config.txt
Created April 11, 2020 12:55
Raspberry Pi B+ config safe overclock
arm_freq=1000
sdram_freq=500
core_freq=500
over_voltage=6
temp_limit=75
boot_delay=0
disable_splash=1
gpu_mem=256
@wooyey
wooyey / config.txt
Created April 11, 2020 12:57
Raspbbery Pi B+ super overclock seems to be safe
gpu_mem=256
force_turbo=1 #Voids warranty!
arm_freq=1000
sdram_freq=500
core_freq=500
over_voltage=6
temp_limit=75 #Will throttle to default clock speed if hit.
boot_delay=0
disable_splash=1
@wooyey
wooyey / gist:ad9e09325d9b746b79756838cffb86ab
Created April 11, 2020 12:59
Raspberry Pi 3 little turbo
arm_freq=1350
core_freq=500
over_voltage=4
disable_splash=1
#force_turbo=1 #Voids Warranty! (uncomment to avoid CPU scaling down to 600Mhz)
#boot_delay=1 #helps to avoid sdcard corruption when force_turbo is enabled.
#sdram_freq=500 #uncomment to test. Works only with some boards.
@wooyey
wooyey / docker_cheatsheet.md
Last active March 2, 2023 08:45
Remove dangling docker images

Docker cheat-sheet

Cleanup

Remove dangling images:

docker rmi $(docker images --filter "dangling=true" -q --no-trunc)

Remove all stopped docker containers:

# Pulse Audio controls
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 0 +5% #increase sound volume
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 0 -5% #decrease sound volume
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 0 toggle # mute sound
# Media player controls
bindsym XF86AudioPlay exec playerctl play-pause
bindsym XF86AudioNext exec playerctl next
bindsym XF86AudioPrev exec playerctl previous
@wooyey
wooyey / NazwaPL SSL CSR.md
Created August 22, 2020 19:21
SSL CSR Generation

Private key generation

openssl ecparam -out my.key -name secp384r1 -genkey

Generate CSR

openssl req -new -key my.key -out my.csr -sha256
@wooyey
wooyey / mongo.md
Last active November 10, 2020 22:02
Mongo Cheat Sheet

Login

use <db_name>
db.auth('user', 'pass')

Collections

show collections