Skip to content

Instantly share code, notes, and snippets.

@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 / 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!

My Openshift Cheatsheet

Examine the cluster quota defined for the environment:

$ oc describe AppliedClusterResourceQuota

Install pkgs using yum in a Dockerfile

@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
@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: