Skip to content

Instantly share code, notes, and snippets.

View cyberpau's full-sized avatar

cyberpau cyberpau

View GitHub Profile
@cyberpau
cyberpau / SearchAllTables.sql
Last active June 27, 2019 02:59
Deep string search on all tables inside the database (SQL Server); credits to original owner
CREATE PROC SearchAllTables
(
@SearchStr nvarchar(100)
)
AS
BEGIN
CREATE TABLE #Results (ColumnName nvarchar(370), ColumnValue nvarchar(3630))
SET NOCOUNT ON
@cyberpau
cyberpau / check-for-sp-names
Last active March 4, 2020 07:50
This is just my compilation of useful / awesome SQL Server scripts.
--CHECK FOR SP NAMES
SELECT ROUTINE_NAME, ROUTINE_DEFINITION
FROM INFORMATION_SCHEMA.ROUTINES
WHERE ROUTINE_DEFINITION LIKE '%OpenCount%'
AND ROUTINE_TYPE='PROCEDURE'
@cyberpau
cyberpau / BatchInputGenerator.bat
Created June 27, 2019 03:09
Generate nth number of text file with different incrementing parameters. This is useful for generating multiple files for batch processing.
@echo off
setlocal
if "%1" == "" goto USAGE
if "%2" == "" goto USAGE
if "%3" == "" goto USAGE
set FormatDescription=%1
set LoopCount=%2
set YYYYMMDD=%3
set /a RAND=%RANDOM% %%100
@cyberpau
cyberpau / amazon-eks-vpc-sample.yaml
Last active March 5, 2020 09:17
Sample AWS configuration
# https://amazon-eks.s3-us-west-2.amazonaws.com/cloudformation/2019-11-15/amazon-eks-vpc-sample.yaml
# Sample CloudFormation Stack Configuration from AWS
---
AWSTemplateFormatVersion: '2010-09-09'
Description: 'Amazon EKS Sample VPC'
Parameters:
VpcBlock:
@cyberpau
cyberpau / prescript-docker-k8s-on-centos8.sh
Last active March 4, 2020 09:07
Prerequisite Script for Docker and Kubernetes VMs. To use: curl -s <gist-raw-link> | sh -s
#!/bin/bash
# Authored by John Paulo Mataac
if [[ $EUID > 0 ]]
then echo "Exiting... Please run as root"
exit
fi
### Update and install prerequisite tools
dnf -y update
@cyberpau
cyberpau / install-minikube-centOS-8.sh
Last active March 4, 2020 09:07
Install MiniKube
#!/bin/bash
# Authored by John Paulo Mataac
if [[ $EUID > 0 ]]
then echo "Exiting... Please run as root"
exit
fi
### Download
curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 \
@cyberpau
cyberpau / sample-nginx-deployment.yaml
Created March 4, 2020 10:09
Kubernetes Sample Deployment Configuration for Nginx Servers
# Kubernetes Sample Deployment Configuration for Nginx Servers
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
labels:
app: nginx
spec:
replicas: 3
@cyberpau
cyberpau / nginx-deployment.yaml
Created March 5, 2020 09:15
Kubernetes Sample Deployment Configuration for Nginx Servers
# Kubernetes Sample Deployment Configuration for Nginx Servers
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
labels:
app: nginx
spec:
replicas: 3
# https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.0-beta8/aio/deploy/recommended.yaml
# Copyright 2017 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
@cyberpau
cyberpau / dito-logo.md
Created July 17, 2020 01:53
Color Palette Cheatsheet

DITO Logo

  • Dark Blue: #0f63ab
  • Strong Pink: #d32653
  • Very Soft Blue: #aadcf5
  • Very Pale (mostly white) Cyan: #fcffff