Skip to content

Instantly share code, notes, and snippets.

View wignesh's full-sized avatar
🎯
Focusing

vignesh wignesh

🎯
Focusing
View GitHub Profile
@wignesh
wignesh / unlock-mdm.sh
Last active August 27, 2025 10:07
unlock apple mdm
#!/bin/bash
# Global constants
readonly DEFAULT_SYSTEM_VOLUME="Macintosh HD"
readonly DEFAULT_DATA_VOLUME="Macintosh HD - Data"
# Text formating
RED='\033[1;31m'
GREEN='\033[1;32m'
BLUE='\033[1;34m'
@wignesh
wignesh / apple-blocklist.txt
Created June 28, 2024 12:10
List of apple or apple related domains
||apple.com^
||icloud.com^
||apple-dns.net^
||apple^
||aaplimg.com^
||herokudns.com^
||icloud-content.com^
||exp-tas.com^
||icloud-content.com^
||icloud.com.cn^

FWIW: I'm not the author of the content presented here (which is an outline from Edmond Lau's book). I've just copy-pasted it from somewhere over the Internet, but I cannot remember what exactly the original source is. I was also not able to find the author's name, so I cannot give him/her the proper credits.


Effective Engineer - Notes

What's an Effective Engineer?

@wignesh
wignesh / filterArray.js
Created September 14, 2021 12:42 — forked from jherax/arrayFilterFactory.1.ts
Filters an array of objects with multiple match-criteria.
/**
* Filters an array of objects using custom predicates.
*
* @param {Array} array: the array to filter
* @param {Object} filters: an object with the filter criteria
* @return {Array}
*/
function filterArray(array, filters) {
const filterKeys = Object.keys(filters);
return array.filter(item => {
@wignesh
wignesh / apache2
Created June 29, 2021 14:53
EC2 user data to install apache web server on Amazon Linux 2 Image
#!/bin/bash
yum update -y
yum install -y httpd
instanceId=$(curl http://169.254.169.254/latest/meta-data/instance-id)
localIpv4=$(curl http://169.254.169.254/latest/meta-data/local-ipv4)
localHostname=$(curl http://169.254.169.254/latest/meta-data/local-hostname)
publicHostname=$(curl http://169.254.169.254/latest/meta-data/public-hostname)
publicIpv4=$(curl http://169.254.169.254/latest/meta-data/public-ipv4)
@wignesh
wignesh / jamf.md
Created June 16, 2021 17:06 — forked from a7ul/jamf.md
removing all restrictions on jamf managed macos device - Provided you have root access.

REMOVE JAMF RESTRICTIONS ON MAC

REMOVE ONLY RESTRICTIONS

sudo jamf removeMDMProfile removes all restrictions

sudo jamf manage brings back all restrictions and profiles

REMOVE ALL RESTRICTIONS AND DISABLE JAMF BINARIES WHILE KEEPING YOUR ACCESS TO VPN AND OTHER SERVICES

sudo jamf removeMDMProfile removes all restrictions

@wignesh
wignesh / installation-hadoop-3.1.4.sh
Created May 3, 2021 06:10
Hadoop 3.1.4 installation
#!/bin/bash
sudo apt update -y
sudo apt-get install openjdk-8-jre -y
echo "export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-i386" >>~/.bashrc
echo "export PATH=$JAVA_HOME/bin:$PATH" >>~/.bashrc
source ~/.bashrc
wget -qO- https://apachemirror.wuchna.com/hadoop/common/hadoop-3.1.4/hadoop-3.1.4.tar.gz | tar zxvf -
cat > hadoop-3.1.4/etc/hadoop/core-site.xml <<EOF
<configuration>
@wignesh
wignesh / index.html
Created December 5, 2020 07:28
Intraday area
<div id="container" style="height: 400px; min-width: 310px"></div>
<script src="https://code.highcharts.com/stock/highstock.js"></script>
<script src="https://code.highcharts.com/stock/modules/data.js"></script>
<script src="https://code.highcharts.com/stock/modules/exporting.js"></script>
<script src="https://code.highcharts.com/stock/modules/export-data.js"></script>