Skip to content

Instantly share code, notes, and snippets.

@jordigg
jordigg / create_macos_mojave_iso.sh
Created September 26, 2018 14:34
How to create an ISO for MacOS Mojave through the command line
hdiutil create -o /tmp/mojave.cdr.dmg -size 7130m -layout SPUD -fs HFS+J
hdiutil attach /tmp/mojave.cdr.dmg -noverify -mountpoint /Volumes/install_build
sudo /Applications/Install\ macOS\ Mojave.app/Contents/Resources/createinstallmedia --volume /Volumes/install_build
hdiutil detach /Volumes/Install\ macOS\ Mojave
mv /tmp/mojave.cdr.dmg ~/Desktop/InstallSystem.dmg
hdiutil convert ~/Desktop/InstallSystem.dmg -format UDTO -o ~/Desktop/mojave.iso
mv ~/Desktop/mojave.iso.cdr ~/Desktop/mojave.iso
rm ~/Desktop/InstallSystem.dmg

Keybase proof

I hereby claim:

  • I am jordigg on github.
  • I am jordigg (https://keybase.io/jordigg) on keybase.
  • I have a public key ASDFCuaC95nUjJ6FJ5gBByQd2NGkuD0R0WrOz-pqg9V4Ggo

To claim this, I am signing this object:

@jordigg
jordigg / bigsur_app_to_iso.sh
Created November 13, 2020 08:23
MacOS 11 Big Sur App to ISO
#!/bin/bash
# MacOS Big Sur isntaller to ISO conversion
# Version 11-2020
# Creator: Jordi Garcia
# Github: Jordigg
hdiutil create -o /tmp/bigsur.cdr.dmg -size 14000m -layout SPUD -fs HFS+J
hdiutil attach /tmp/bigsur.cdr.dmg -noverify -mountpoint /Volumes/install_build
@jordigg
jordigg / gcpw_enrollment.ps1
Created December 15, 2020 19:25
Google GCPW enrolment script
<# This script downloads Google Credential Provider for Windows from
https://tools.google.com/dlpage/gcpw/, then installs and configures it.
Windows administrator access is required to use the script.
If Chrome enterprise is not present, it will also download and install it
and it will enroll them to the Chrome Enterprise
#>
<# Specify a -user parameter if you want to bind the current user account to a Google account.
-User [email protected] -> to specify email to enroll current windows account
-MDMvalue 1 -> to enable automatic MDM Enrollment to Google Endpoint Management
@jordigg
jordigg / notion_users.go
Created March 8, 2022 14:59
Get Notion workspace users through API using go and jomei/notionapi wrapper
package main
import (
"context"
"encoding/json"
"fmt"
"github.com/jomei/notionapi"
"github.com/pkg/errors"
)
@jordigg
jordigg / generate_world_holidays_calendar.py
Last active February 5, 2025 04:24
Generates a calendar file in ICS format with holidays around the world that are available on the nager API. It groups similar holidays showing the flag emoji of the corresponding countries. It also tries to find a Wikipedia link with more information about the holiday.
import wikipedia
import requests
from datetime import datetime
from ics import Calendar, Event
import argparse
import warnings
from bs4 import GuessedAtParserWarning
# Parses command line arguments
parser = argparse.ArgumentParser()
@jordigg
jordigg / expense_download.py
Created July 12, 2023 12:01
Download Expense attachment PDF from Holded ERP API. Expenses are stored in a folder structure by year > month > invoice.pdf a CSV file is generated to provide logs about the progress and files exported
import csv
import requests
import json
import base64
import os
from datetime import datetime
import re
from tqdm import tqdm
# File to store the processed documents
@jordigg
jordigg / crowdstrike_settings_macOS15.mobileconfig
Created October 22, 2024 22:01
CrowdStrike macOS 15 settings config file example for use with Kandji MDM
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PayloadContent</key>
<array>
<dict>
<key>FilterBrowsers</key>
<false />
<key>FilterDataProviderBundleIdentifier</key>