Skip to content

Instantly share code, notes, and snippets.

View developerinlondon's full-sized avatar
🙂
BizOps

Wizard Supreme of AI and Automation - Nayeem Syed developerinlondon

🙂
BizOps
View GitHub Profile

Disable Device Enrollment Program (DEP) notification on macOS Catalina.md

With full reinstall (recommended)

   a. Boot into recovery using command-R during reboot, wipe the harddrive using Disk Utility, and select reinstall macOS

   b. Initial installation will run for approximately 1 hour, and reboot once

   c. It will then show a remaining time of about 10-15 minutes

@developerinlondon
developerinlondon / docker.md
Last active January 9, 2024 11:31
Docker saving and loading images

Here's how to save and load docker images:

Example scenario: To save a docker image from a docker repository and save it as a tar file locally.

  1. Save the image as a tarball

docker save repositoryname:tag > repotag.tar

  1. Zip the image
@developerinlondon
developerinlondon / useful-ansible-stuff
Created February 27, 2018 16:11
useful ansible stuff
ansible-playbook install-jenkins.yml --list-tasks
ansible file directory layout
ansible/inventory/
Production (group: dc1,dc2)
development
staging
group_vars/
all.yml
webservers/
secrets.yml
@developerinlondon
developerinlondon / SetBuildEnvVars.groovy
Created April 12, 2021 18:19 — forked from alces/SetBuildEnvVars.groovy
Set environment variables during a Jenkins build using Groovy
// should be run as Groovy System Script
import hudson.EnvVars
import hudson.model.Environment
def build = Thread.currentThread().executable
def vars = [ENV_VAR1: 'value1', ENV_VAR2: 'value2']
build.environments.add(0, Environment.create(new EnvVars(vars)))
@developerinlondon
developerinlondon / gist:c5b0f05eaebd9ca2357edabbfa593a80
Created February 9, 2021 20:20
Big Sur Remove Device Enrollment
This works for macOS Big Sur to Disable MDM notifications
Restart in Recovery Mode Restart your Mac then hold down the Command & R keys together until you're in the Recovery Mode menu (Command+R)
Click on Utilities (top menu bar) then select: Startup Security Utility
A 3-choices popup appears: select (No security) (there is no confirmation button to press)
Restart again in Recovery Mode (Command+R)
Click on Utilities (top menu bar) then select Terminal
type in: mount then click enter/return
A list of things will show up once you enter in (mount) in Terminal Write down the disk associated with /Volumes/Macintosh HD (mine was /dev/disk2s5) Note: it's not "/", and it's not /Volumes/Macintosh HD - Data
Next, in Terminal, write: umount /Volumes/Macintosh\ HD

Disable Device Enrollment Notification on Mac.md

Restart the Mac in Recovery Mode by holding Comment-R during restart

Open Terminal in the recovery screen and type

csrutil disable
@developerinlondon
developerinlondon / create-ecr-imagepullsecret.sh
Created June 17, 2016 23:47
Allow Multi-region Kubernetes to ECR Registry
#!/bin/bash
#
# Create a Kubernetes registry secret for an AWS ECR region
# Requires AWS CLI: https://aws.amazon.com/cli/
# Requires kubectl: https://coreos.com/kubernetes/docs/latest/configure-kubectl.html
#
#
# This secret can be used with 'imagePullSecret' for Kubernetes
@developerinlondon
developerinlondon / bashrc
Created September 6, 2013 12:25
my bashrc file with funky colors.
# enable color support of ls and also add handy aliases
source ~/.rvm/scripts/rvm
alias ls='ls -hGFp'
alias dir='ls -hGFp'
alias vdir='ls -hGFp'
alias g='git'
complete -o default -o nospace -F _git g
export LSCOLORS=gxBxhxDxfxhxhxhxhxcxcx
#PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
@developerinlondon
developerinlondon / docker-machine-rename
Created December 13, 2017 10:34 — forked from alexproca/docker-machine-rename
Rename docker-machine
#!/usr/bin/env bash
#copy this in a folder from path ex: /usr/local/bin
#usage: docker-machine-rename default my-default
OLD_MACHINE_NAME=${1:-default};
NEW_MACHINE_NAME=${2:-my-default-2};
STORE_PATH=`docker-machine inspect $OLD_MACHINE_NAME | grep -m 1 StorePath | cut -d ':' -f 2 | cut -c 3- | rev | cut -c 3- | rev`;
mv "$STORE_PATH/machines/$OLD_MACHINE_NAME" "$STORE_PATH/machines/$NEW_MACHINE_NAME";
cp "$STORE_PATH/machines/$NEW_MACHINE_NAME/config.json" "$STORE_PATH/machines/$NEW_MACHINE_NAME/config.json.bak"
require 'active_support/core_ext/hash/conversions'
require 'yaml'
file = File.open("data/mconvert.xml", "r")
hash = Hash.from_xml(file.read)
yaml = hash.to_yaml
File.open("data/mirador.yml", "w") { |file| file.write(yaml) }