Skip to content

Instantly share code, notes, and snippets.

@dzabel
dzabel / openshift-cheatsheet.md
Created August 17, 2020 09:26 — forked from rafaeltuelho/openshift-cheatsheet.md
My Openshift Cheatsheet

My Openshift Cheatsheet

Openshift build secrets for cloning git repos using SSH Keys

  • To create ssh secret:
oc create secret generic sshsecret \
    --from-file=ssh-privatekey=$HOME/.ssh/id_rsa
@dzabel
dzabel / gist:1058630a6101520870b221e8e66eccf1
Created July 15, 2020 16:27 — forked from digitaljhelms/gist:4287848
Git/GitHub branching standards & conventions

Branching

Quick Legend

Description, Instructions, Notes
Instance Branch
@dzabel
dzabel / brew_packages.sh
Last active January 15, 2020 23:15
update installed brew packages and push brew_packes to git, to get it work, your need to install "brew tap buo/cask-upgrade"
#!/bin/bash
dateValue=''
newDate=$(date +"%m_%d_%Y")
if [ -f /tmp/brew_update_date.txt ]; then
dateValue=$(</tmp/brew_update_date.txt)
fi
if [ ! -f /tmp/brew_upgrade.lock ]; then
touch /tmp/brew_upgrade.lock
#!/usr/bin/env bash
LC_CTYPE=C
LANG=C
FILE=$1
for props in $(cat $FILE | cut -d= -f 1 | grep -v ^$ | grep -v \# | grep -v "^\ "); do
LINE=$(grep "^$props" $FILE | awk -F= '{print $2}')
if [[ $LINE == *'${'* ]]; then
IFS=',' read -r -a array <<< "$LINE"
for element in "${array[@]}"
do
@dzabel
dzabel / cache-redis.php
Created January 24, 2018 19:41 — forked from pfeiferbit/cache-redis.php
Configure TYPO3 6.2 to use Redis as LRU Cache. Put in typo3conf/conf.d/ and include via typo3conf/AdditionalConfiguration.php or merge array with LocalConfiguration.php.
<?php
/**
* @see: typo3_src/typo3/sysext/core/Configuration/DefaultConfiguration.php
*/
/**
* If phpredis extension exists, set cache backends to redis
*/
if (extension_loaded('redis')) {
@dzabel
dzabel / .kitchen.ssh.yml
Last active October 20, 2017 16:11
tractorsupply-proxy-kitchen.ssh
---
provisioner:
name: chef_solo
require_chef_omnibus: false
chef_omnibus_root: <%= ENV.fetch('CHEF_OMNIBUS_ROOT', '/opt/chefdk') %>
environments_path: '../../environments'
solo_rb:
environment: development
# we need to make global driver and provisioner section empty as there is no comon default
@dzabel
dzabel / file_loader.sh
Last active May 30, 2016 14:25
filedownload - verify checksum
#!/bin/bash
DL_URL='http://my-remote-url'
# assumes that for each file a same file with .sha256 extension exists
DUMPS="dlfile1 dlfile2"
for i in ${DUMPS}; do
while [ "x$(curl --silent "${DL_URL}/${i}.sha256" -o ${i}.sha256 && cat ${i}.sha256 | cut -d ' ' -f 1)" != "x$(sha256sum "${i}" 2>/dev/null | cut -d ' ' -f 1)" ]; do
echo "Downloading file ${i} ..."
curl --silent -L -O ${DL_URL}/${i}
done
done
@dzabel
dzabel / gist:d58007aa52c2c56b8db0
Last active August 29, 2015 14:24 — forked from ursbraem/gist:f6b573724c9dad9724a0
Typo3 User Options Setup
options {
// enable upload fields in Element Browser
uploadFieldsInTopOfEB = 1
createFoldersInEB =1
//Add save-and-new to all forms
saveDocNew = 1
// better Page tree
pageTree {
showNavTitle = 1
showPageIdWithTitle = 1
@dzabel
dzabel / keybase.md
Last active August 29, 2015 14:15
keybase.io/dzabel

Keybase proof

I hereby claim:

  • I am dzabel on github.
  • I am dzabel (https://keybase.io/dzabel) on keybase.
  • I have a public key whose fingerprint is 67CE 8670 04F1 F50B B56A 128B FA71 C884 08B0 742F

To claim this, I am signing this object:

@dzabel
dzabel / connector.sh
Created September 3, 2013 08:28
Bash Shell Script to mount remote filesystems using sshfs - adapted version macosx
#!/usr/bin/env bash
# This script was originally written by Matt Craig
# Original Version can be found here:
# http://taggedzi.com/articles/display/bash-shell-script-to-mount-remote-systems-using-sshfs
# This script was adapet to work on OSX by Daniel Zabel
# This script comes with NO Warranty. Make sure you read the script
# And understand what it does before you use it. It is Your responsibility
# to ensure this does what you want it to do BEFORE you run it.