Skip to content

Instantly share code, notes, and snippets.

View adomenech73's full-sized avatar

Albert Doménech adomenech73

View GitHub Profile
@carlosjgp
carlosjgp / Helm
Last active December 28, 2022 14:46
Tyk - Deployment and configuration
# redis
helm upgrade --install --namespace tyk \
--version 6.3.1 redis redis \
--set usePassword=false,cluster.enabled=true,cluster.slaveCount=2,metrics.enabled=true
# mongo
helm upgrade --install --namespace tyk \
--version 3.9.2 mongodb mongodb-replicaset \
--set replicas=3,metrics.enabled=true,persistentVolume:size=10Gi
@skyzyx
skyzyx / homebrew-gnubin.md
Last active July 22, 2024 13:35
Using GNU command line tools in macOS instead of FreeBSD tools

macOS is a Unix, and not built on Linux.

I think most of us realize that macOS isn't a Linux OS, but what that also means is that instead of shipping with the GNU flavor of command line tools, it ships with the FreeBSD flavor. As such, writing shell scripts which can work across both platforms can sometimes be challenging.

Homebrew

Homebrew can be used to install the GNU versions of tools onto your Mac, but they are all prefixed with "g" by default.

All commands have been installed with the prefix "g". If you need to use these commands with their normal names, you can add a "gnubin" directory to your PATH from your bashrc.

#!/bin/bash
echo "Installing git"
sudo add-apt-repository ppa:git-core/ppa
sudo apt-get update
sudo apt-get install git -y
echo "Installing ubuntu basic software"
git clone https://gist.github.com/579167be758a9bc340e10ac7e7b1f644.git ubuntu-basic-software
cd ubuntu-basic-software
@ntamvl
ntamvl / install-multiple-jdk-on-macos-high-sierra.md
Last active February 21, 2024 11:12
Install Multiple Java Versions on macOS High Sierra

Install Multiple Java Versions on macOS High Sierra

Install Homebrew Cask

On Mac, Homebrew is the de-facto package manager, and Homebrew Cask is the app manager. I’m going to use Cask to install Java 7 and 8.

Install Homebrew Cask first if you haven’t:

brew update
brew tap caskroom/cask
@thpham
thpham / Jenkinsfile
Created September 14, 2017 09:38 — forked from bvis/Jenkinsfile
Jenkin pipeline definition example to be integrated with Docker Swarm cluster in our CI/CD environment
pipeline {
agent { node { label 'swarm-ci' } }
environment {
TEST_PREFIX = "test-IMAGE"
TEST_IMAGE = "${env.TEST_PREFIX}:${env.BUILD_NUMBER}"
TEST_CONTAINER = "${env.TEST_PREFIX}-${env.BUILD_NUMBER}"
REGISTRY_ADDRESS = "my.registry.address.com"
SLACK_CHANNEL = "#deployment-notifications"
@troyfontaine
troyfontaine / 1-setup.md
Last active July 23, 2024 23:25
Signing your Git Commits on MacOS

Methods of Signing Git Commits on MacOS

Last updated March 13, 2024

This Gist explains how to sign commits using gpg in a step-by-step fashion. Previously, krypt.co was heavily mentioned, but I've only recently learned they were acquired by Akamai and no longer update their previous free products. Those mentions have been removed.

Additionally, 1Password now supports signing Git commits with SSH keys and makes it pretty easy-plus you can easily configure Git Tower to use it for both signing and ssh.

For using a GUI-based GIT tool such as Tower or Github Desktop, follow the steps here for signing your commits with GPG.

@thpham
thpham / install.txt
Created July 11, 2017 18:49
spinnaker install procedure
curl -O https://raw.githubusercontent.com/spinnaker/halyard/master/install/stable/InstallHalyard.sh
sudo bash InstallHalyard.sh
hal config deploy edit --type localdebian
hal config storage edit --type redis
echo "host: 0.0.0.0" | tee \
@kulikov
kulikov / docker-compose.yml
Last active May 13, 2018 13:15
gocd-server docker-compose.yml
version: '2'
services:
gocd-server:
image: unibet/gocd-server
ports:
- 8153:8153
- 8154:8154
volumes:
- ./go-data/etc:/etc/go
- ./go-data/lib:/var/lib/go-server
@lukeplausin
lukeplausin / bash_aws_jq_cheatsheet.sh
Last active July 15, 2024 09:10
AWS, JQ and bash command cheat sheet. How to query, cut and munge things in JSON generally.
# Count total EBS based storage in AWS
aws ec2 describe-volumes | jq "[.Volumes[].Size] | add"
# Count total EBS storage with a tag filter
aws ec2 describe-volumes --filters "Name=tag:Name,Values=CloudEndure Volume qjenc" | jq "[.Volumes[].Size] | add"
# Describe instances concisely
aws ec2 describe-instances | jq '[.Reservations | .[] | .Instances | .[] | {InstanceId: .InstanceId, State: .State, SubnetId: .SubnetId, VpcId: .VpcId, Name: (.Tags[]|select(.Key=="Name")|.Value)}]'
# Wait until $instance_id is running and then immediately stop it again
aws ec2 wait instance-running --instance-id $instance_id && aws ec2 stop-instances --instance-id $instance_id
# Get 10th instance in the account
@DarrenN
DarrenN / get-npm-package-version
Last active July 15, 2024 13:04 — forked from yvele/get-npm-package-version.sh
Extract version from package.json (NPM) using bash / shell
# Version key/value should be on his own line
PACKAGE_VERSION=$(cat package.json \
| grep version \
| head -1 \
| awk -F: '{ print $2 }' \
| sed 's/[",]//g')
echo $PACKAGE_VERSION