Skip to content

Instantly share code, notes, and snippets.

@zipmegabyte
zipmegabyte / Disable Device Enrolment Notification on MacOS.md
Last active March 31, 2021 21:34
Disable Device Enrolment Notification on MacOS without messing with the readonly filesystem

Disable Device Enrolment Notification on MacOS in 4 easy steps

Attention: Doesn't seem to work. More investigation is necessary. Will update if able to fix.

1. Open Terminal.app

2. Copy the readonly plist file to your userspace

mkdir ~/Library/LaunchDaemons
@zipmegabyte
zipmegabyte / validateCpfCnpj.js
Created January 6, 2014 17:52
A simple js validator for CPF /CNPJ
function validateCpfCnpj(cpfCnpj) {
'use strict';
var arr;
function buildDigit(arr) {
var isCpf = arr.length < 11,
digit = arr.map(function (val, idx) {return val * ((!isCpf ? idx % 8 : idx) + 2)}).reduce(function (total, current) {return total + current}) % 11;