Skip to content

Instantly share code, notes, and snippets.

View miladjahandideh's full-sized avatar
🏠
Working Remote

Milad Jahandideh miladjahandideh

🏠
Working Remote
View GitHub Profile
@yokawasa
yokawasa / ghcr.md
Last active April 8, 2025 01:08
ghcr (GitHub Container Registry)

ghcr (GitHub Container Registry) quickstart

CLI

To push container images to ghcr, you need peronal access token (PAT) - see how to create PAT

  1. Get PAT (personal access token)

Personal Settings > Developer settings > Personal access tokens

@dudebowski
dudebowski / select_playbook.yml
Created May 25, 2020 14:17
Select items from lists in Ansible
---
## See
## https://docs.ansible.com/ansible/latest/plugins/lookup/vars.html
## https://docs.ansible.com/ansible/latest/reference_appendices/faq.html#when-should-i-use-also-how-to-interpolate-variables-or-dynamic-variable-names
- name: select
gather_facts: false
hosts: localhost
connection: local
vars:
@pertoft
pertoft / ceph-commands.txt
Last active October 31, 2024 15:24
Ceph command cheatsheet
ceph -w
ceph health detail
ceph osd df
ceph osd find
ceph osd blocked-by
ceph osd pool ls detail
ceph osd pool get rbd all
ceph pg dump | grep pgid
ceph pg pgid
@djoreilly
djoreilly / ovs-cheat.md
Last active April 25, 2025 19:31
OVS cheat sheet

DB

ovs-vsctl list open_vswitch
ovs-vsctl list interface
ovs-vsctl list interface vxlan-ac000344
ovs-vsctl --columns=options list interface vxlan-ac000344
ovs-vsctl --columns=ofport,name list Interface
ovs-vsctl --columns=ofport,name --format=table list Interface
ovs-vsctl -f csv --no-heading --columns=_uuid list controller
ovs-vsctl -f csv --no-heading -d bare --columns=other_config list port
@halberom
halberom / opt1_template.j2
Last active January 17, 2025 12:34
ansible - example of template if else
{# style 1 - long form #}
{% if filepath == '/var/opt/tomcat_1' %}
{% set tomcat_value = tomcat_1_value %}
{% else %}
{% set tomcat_value = tomcat_2_value %}
{% endif %}
{# style 2 - short form #}
{% set tomcat_value = tomcat_1_value if (filepath == '/var/opt/tomcat_1') else tomcat_2_value %}