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
@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 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

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 / 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 / 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) }
---
- name: Spring Example | Check if Project Exists
shell: oc projects | grep spring-example
register: project_exists
ignore_errors: yes
- block:
- name: Spring Example | Create Spring Project
command: oc new-project spring-example

Keybase proof

I hereby claim:

  • I am developerinlondon on github.
  • I am nayeemsyed (https://keybase.io/nayeemsyed) on keybase.
  • I have a public key ASA_RMp_l4izzJXS1O-2cMRpMH0bAulm4daPvLy3IR5oMAo

To claim this, I am signing this object:

@developerinlondon
developerinlondon / hostsfile.py
Created June 8, 2017 14:44 — forked from jtyr/hostsfile.py
Ansible dynamic inventory script that reads any Ansible hosts file and transforms it into the JSON data structure.
#!/usr/bin/python2
#####
#
# Description
# -----------
#
# This is an Ansible dynamic inventory script that reads any Ansible hosts file
# and transforms it into the JSON data structure.
#