Skip to content

Instantly share code, notes, and snippets.

View wojukasz's full-sized avatar
🕶️
They live...

Lukas W wojukasz

🕶️
They live...
  • Earth
View GitHub Profile
@wojukasz
wojukasz / keybindings.json
Created March 31, 2023 11:43
VsCode + Vim keybindings and settings - best of both worlds
[
//
// VIM NAVIGATION SHORTCUTS
//
{
// "ctrl+h": Focuses on the left editor group when the text editor is focused, Vim extension is active, and Vim is not in Insert mode.
"key": "ctrl+h",
"command": "workbench.action.focusLeftGroup",
"when": "editorTextFocus && vim.active && vim.mode != 'Insert'"

Everforest - Alacritty

In ~/.config/alacritty/alacritty.yml:

# Define
schemes:
  everforest_dark_hard: &everforest_dark_hard
    primary:
      background: '#272e33'
@quiver
quiver / iam-policy.json
Last active July 19, 2024 19:37
How to connect to Amazon RDS PostgreSQL with IAM credentials
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"rds-db:connect"
],
"Resource": [
"arn:aws:rds-db:region:account-id:dbuser:dbi-resource-id/database-user-name"
@altaurog
altaurog / docker_descendants.py
Last active August 11, 2024 09:08
Python3 script to find descendants of one or more docker images
#!/usr/bin/python3
#
# usage: python3 docker_descendants.py <image_id> ...
import sys
from subprocess import check_output
def main(images):
image_ids = set(images)
@umidjons
umidjons / youtube-dl-download-audio-only-on-best-quality.md
Last active November 14, 2024 21:20
Download Audio from YouTube with youtube-dl

Download Audio from YouTube

-i - ignore errors

-c - continue

-t - use video title as file name

--extract-audio - extract audio track

Coverting tomcat class into a parameterised class

class tomcat inherits tomcat::params{

class tomcat(
 $xms, 
@initcron
initcron / puppet_lab_chap6_templates.md
Last active February 10, 2022 16:41
Puppet Labs Chapter 6 - Templates

Converting tomcat.conf into a template

We always start with the original file (e.g. https://gist.github.com/initcron/01f8554fba3305a1bceee9df5ff0aa24)

Create file structure to store the templates

  • Create a director modules/manifests/templates
  • Create a ERB file for tomcat.conf at modules/manifests/templates/tomcat.conf.erb
  • Copy over the contents of the original tomcat.conf. You could use the link above as a sample content
@initcron
initcron / puppet_lab_chap5_params_facts.md
Last active February 10, 2022 16:29
Lab Chapter 5 : Data Driven Modules - Params and Facts

Parameters and Facts

Playing with Scopes

app.pp


@andreicristianpetcu
andreicristianpetcu / ansible-summary.md
Created May 30, 2016 19:25
This is an ANSIBLE Cheat Sheet from Jon Warbrick

An Ansible summary

Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)

Configuration file

intro_configuration.html

First one found from of

@bastman
bastman / docker-cleanup-resources.md
Created March 31, 2016 05:55
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm