Skip to content

Instantly share code, notes, and snippets.

View nguni52's full-sized avatar

Nguni nguni52

View GitHub Profile
@nguni52
nguni52 / openssl_commands.md
Created May 23, 2023 16:42 — forked from Hakky54/openssl_commands.md
Some list of openssl commands for check and verify your keys

OpenSSL 🔐

Install

Install the OpenSSL on Debian based systems

sudo apt-get install openssl
@nguni52
nguni52 / my-docker-machines.sh
Created November 11, 2019 19:39
Stop multiple docker machines
#!/bin/sh
machine_names=( $(docker-machine ls | awk '{print $1}') )
echo $1
case "$1" in
start)
echo "Starting docker machines $1"
for (( i=0; i<${#machine_names[@]}; i++ )); do
echo ${machine_names[i]};
docker-machine start ${machine_names[i]}
@nguni52
nguni52 / local-swarm.md
Created October 29, 2019 06:44
How to create a swarm locally using virtualbox.
#!/usr/bin/env bash
for i in 1 2 3 4; do
docker-machine create -d virtualbox --virtualbox-cpu-count 2 --virtualbox-memory 1024 local-moitrack-swarm-$i
done
eval $(docker-machine env local-moitrack-swarm-1)
docker swarm init --advertise-addr $(docker-machine ip local-moitrack-swarm-1)
@nguni52
nguni52 / swift-implement-share.swift
Last active August 15, 2017 12:23
This shows how to implement a share via social media and text or any other app that allows sharing on iOS
@IBAction func shareButtonTapped(_ sender: Any) {
debugPrint("share button has been tapped")
// text to share
let text = self.currSelectedStore + " have a special! Take a look."
// let urlToShare : storeSpecialsImageUrl
// If you want to put an image
let image : UIImage = self.specialsImageView.image!