Skip to content

Instantly share code, notes, and snippets.

@jandradap
jandradap / ocp-tekton-ca-test.yaml
Created January 14, 2022 08:36
openshifr tekton check ca
apiVersion: tekton.dev/v1beta1
kind: Task
metadata:
name: ca-test
spec:
params:
- description: url repo git
name: URL_GIT_SSL
type: string
workspaces:
@jandradap
jandradap / ansible_local_playbooks.md
Created August 30, 2019 11:36 — forked from alces/ansible_local_playbooks.md
How to run an Ansible playbook locally
  • using Ansible command line:
ansible-playbook --connection=local 127.0.0.1 playbook.yml
  • using inventory:
127.0.0.1 ansible_connection=local

My Openshift Cheatsheet

Examine the cluster quota defined for the environment:

$ oc describe AppliedClusterResourceQuota

Install pkgs using yum in a Dockerfile

@jandradap
jandradap / migrate_mysq4to5.sh
Created February 20, 2019 07:18 — forked from atufkas/migrate_mysq4to5.sh
Converting MySQL4 database dump syntax to MySQL5
#
# MIGRATE MySQL4 DATABASES TO MySQL5 - Steps for dumping and converting
#
# Uses mysqldump and patches output to be compatible with MySQL 5.5+ (? - no sure
# at which specific release of MySQL 5 the old style syntax support ended).
#
# Conversion is most likely incomplete. It does some essential converting where
# I regularly experienced problems during migration.
#
# Use on own risk, always try with test databases first. No warranty at all!
@jandradap
jandradap / db-connect-test.php
Created February 20, 2019 06:51 — forked from chales/db-connect-test.php
Script for a quick PHP MySQL DB connection test.
<?php
# Fill our vars and run on cli
# $ php -f db-connect-test.php
$dbname = 'name';
$dbuser = 'user';
$dbpass = 'pass';
$dbhost = 'host';
$connect = mysql_connect($dbhost, $dbuser, $dbpass) or die("Unable to Connect to '$dbhost'");
@jandradap
jandradap / update_git_repos.sh
Last active November 2, 2018 23:26
Update all git repos in the path
#!/bin/bash
# -*- ENCODING: UTF-8 -*-
#
# ------------------------------------------------------------------
# [Jorge Andrada Prieto] [jandradap@gmail.com]
# Title: update_git_repos.sh
# Fecha: 02/11/2018
# Description: Update all git repos in the path
# If the repositories are https, need to configure user and pass/token:
#
@jandradap
jandradap / ansible-summary.md
Created September 4, 2018 10:58 — forked from andreicristianpetcu/ansible-summary.md
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

@jandradap
jandradap / local-cpan-mirror.txt
Created May 29, 2018 06:56 — forked from reyjrar/local-cpan-mirror.txt
Local CPAN Mirror Setup, Simply
#=======================================
# Part 1 is Setting up the Mirror Server
# Install CPAN::Mini
$ curl -L http://cpanmin.us | perl - --sudo CPAN::Mini
# Select a CPAN Mirror URL from http://mirrors.cpan.org/
# - We'll use http://cpan.pair.com
# Pick a directory to mirror to, I'll use /var/www/cpan
echo "Acquire::Check-Valid-Until false;" > /etc/apt/apt.conf
echo "deb http://archive.debian.org/debian squeeze main contrib non-free" > /etc/apt/sources.list
echo "deb http://archive.debian.org/debian squeeze-lts main contrib non-free" >> /etc/apt/sources.list