Skip to content

Instantly share code, notes, and snippets.

@ccamacho
ccamacho / pv_example.md
Created September 27, 2020 08:54
example pv/pvc kubeinit

From the service machine run:

# Prepare the share PV folder
mkdir -p /var/nfsshare/test-nfs
chmod -R 777 /var/nfsshare/test-nfs
chown -R nobody:nobody /var/nfsshare/test-nfs

# Create the resources
cat << EOF > ~/test_nfs_pv.yaml
@ccamacho
ccamacho / prereq commands
Last active May 14, 2020 20:04
prereq commands
# If the src or dst project belongs to the src or dst with the admin member it will be able to see all resources from all tenants :(
Before
[ccamacho@ibm-p8-kvm-03-guest-02 openstack]$ openstack --os-cloud dst13 router list
+--------------------------------------+--------------------+--------+-------+----------------------------------+-------------+-------+
| ID | Name | Status | State | Project | Distributed | HA |
+--------------------------------------+--------------------+--------+-------+----------------------------------+-------------+-------+
| 278a3639-5c72-44a7-a51e-bb171e86d4d5 | osm_uch_dst_router | ACTIVE | UP | e6be611bd3064d8d827b037d32cfb68c | False | False |
| 55ae42c4-6778-49e3-8c73-bcbad6eb8c7c | osm_router | ACTIVE | UP | f0954830265b4570bc3a928df3a07b3a | False | False |
| c28cf00d-5b17-4b54-ab12-775bde5e64a1 | osm_uch_src_router | ACTIVE | UP | f0954830265b4570bc3a928df3a07b3a | False
@ccamacho
ccamacho / asdf
Created April 25, 2020 12:29
asdf
class Server(resource.Resource):
resource_type = const.RES_TYPE_SERVER
sdk_class = openstack.compute.v2.server.Server
info_from_sdk = [
'addresses',
'id',
'status',
@ccamacho
ccamacho / os-migrate-howto.md
Last active April 1, 2020 12:09
os-migrate dev env

In this post im putting together the steps im following to work on os-migrate, this is setting up my development environment.

1- Start with a fresh deployed f30 machine.

2- Install the following prerequisites:

@ccamacho
ccamacho / .block
Created January 18, 2020 12:39 — forked from nbremer/.block
Self Organizing Map - Hexagonal Heatmap - Lines
license: mit
@ccamacho
ccamacho / jpg-png-optimize.md
Created October 13, 2019 18:37 — forked from w33zy/jpg-png-optimize.md
Optimize your jpg & png images with jpegoptim and optipng on linux

JPG and PNG image bulk optimization

Install jpegoptim and optipng

apt update && apt install jpegoptim optipng -y

JPG optimization

cd /path/to/your/image/folder
@ccamacho
ccamacho / jpg-png-optimize.md
Created October 13, 2019 18:37 — forked from w33zy/jpg-png-optimize.md
Optimize your jpg & png images with jpegoptim and optipng on linux

JPG and PNG image bulk optimization

Install jpegoptim and optipng

apt update && apt install jpegoptim optipng -y

JPG optimization

cd /path/to/your/image/folder
@ccamacho
ccamacho / howto.md
Created September 9, 2018 11:58 — forked from vranystepan/howto.md
Getting Thumbnails / Previews of your RAW files in Fedora 25

Howto

Install these programms

sudo dnf install raw-thumbnailer
sudo dnf install ufraw

Try now if everything works, and your thumbnails show up. If not, try the following part.

$ sudo subscription-manager register --username <RHN_USERNAME> --password <RHN_PASSWORD>

$ sudo subscription-manager list --available

---------------------------------------------------
...
Subscription Name:   Red Hat Enterprise Linux Developer Suite
Pool ID:             1234567890
...
@ccamacho
ccamacho / mistral_client_snippet.py
Created December 13, 2017 14:29
Mistral client snippet
from __future__ import print_function
import copy
import errno
import getpass
import glob
import hashlib
import json
import logging
import os