Skip to content

Instantly share code, notes, and snippets.

Avatar

Dmitry Kutkovskiy Kutkovsky

View GitHub Profile
@Kutkovsky
Kutkovsky / Catalina_ISO.sh
Created Jun 26, 2019
The steps allowing to create macOS 10.15 Catalina VM on vSphere or ESXi
View Catalina_ISO.sh
#!/bin/bash
# Steps to create the macOS Catalina (10.15) VM:
# login to developer.apple.com or beta.apple.com to download a tester's profile for your OS. Install it.
# Go to System Preferences > Software Update and start the update process
# When the Catalina Installer (few MBytes) is started, it downloads the remain part of installation.
# After all `Install Catalina Beta.app` should lay in the /Applications folder with approx. 6.5g size
# Proceed with the following script.
set -eux
@Kutkovsky
Kutkovsky / macOS-mojave-iso.sh
Created Jun 10, 2019 — forked from jamieparfet/macOS-mojave-iso.sh
Create an ISO from the mojave installer app
View macOS-mojave-iso.sh
#!/bin/bash
# This assumes that the ~6GB mojave installer is in the /Applications folder.
# If it's not, just open the App Store, search Mojave, and you can download the installer file from there.
hdiutil create -o /tmp/mojave.cdr -size 6g -layout SPUD -fs HFS+J
hdiutil attach /tmp/mojave.cdr.dmg -noverify -mountpoint /Volumes/install_mojave
sudo /Applications/Install\ macOS\ mojave.app/Contents/Resources/createinstallmedia --volume /Volumes/install_mojave
mv /tmp/mojave.cdr.dmg ~/Desktop/InstallSystem.dmg
hdiutil detach /Volumes/Install\ macOS\ mojave
@Kutkovsky
Kutkovsky / dns-sync.sh
Created Apr 23, 2020 — forked from matthiassb/dns-sync.sh
Init.d script for keeping WSL resolv.conf in-sync with Windows
View dns-sync.sh
#! /bin/bash
### BEGIN INIT INFO
# Provides: dns-sync
# Required-Start:
# Required-Stop:
# Default-Start: S
# Default-Stop:
# Short-Description: Synchronizes /etc/resolv.conf in WLS with Windows DNS - Matthias Brooks
### END INIT INFO
@Kutkovsky
Kutkovsky / web-servers.md
Created Apr 26, 2019 — forked from willurd/web-servers.md
Big list of http static server one-liners
View web-servers.md

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@Kutkovsky
Kutkovsky / highsierra_bootable.sh
Created Jan 28, 2019 — forked from agentsim/highsierra_bootable.sh
Create bootable ISO from HighSierra Installer
View highsierra_bootable.sh
# Generate a BaseSystem.dmg with 10.13 Install Packages
hdiutil attach /Applications/Install\ macOS\ 10.13\ Beta.app/Contents/SharedSupport/InstallESD.dmg -noverify -mountpoint /Volumes/highsierra
hdiutil create -o /tmp/HighSierraBase.cdr -size 7316m -layout SPUD -fs HFS+J
hdiutil attach /tmp/HighSierraBase.cdr.dmg -noverify -mountpoint /Volumes/install_build
asr restore -source /Applications/Install\ macOS\ 10.13\ Beta.app/Contents/SharedSupport/BaseSystem.dmg -target /Volumes/install_build -noprompt -noverify -erase
cp -R /Volumes/highsierra/Packages /Volumes/OS\ X\ Base\ System/System/Installation
hdiutil detach /Volumes/OS\ X\ Base\ System/
hdiutil detach /Volumes/highsierra/
mv /tmp/HighSierraBase.cdr.dmg /tmp/BaseSystem.dmg
@Kutkovsky
Kutkovsky / toggl.py
Last active Nov 27, 2018
Another version of Toggl-parser.
View toggl.py
#!/usr/local/bin/python3
import sys
import csv
import xlwt
import requests
import json
import pandas
from datetime import datetime
@Kutkovsky
Kutkovsky / togglproceed.py
Last active Oct 31, 2018
Togglproceed.py
View togglproceed.py
#!/usr/local/bin/python3
import csv
import xlwt
'''
TODO: import report automatically from toggl.com (token: '<your token here>')
curl -v -u <your token here>:api_token -X GET "https://toggl.com/api/v8/workspaces"
curl -v -u <your token here>:api_token -X GET "https://toggl.com/reports/api/v2/details?page=<report_page_since_its_paginated>&workspace_id=<ourworkspacenumber>&since=2018-10-01&until=2018-10-31&user_agent=api_test"
'''