Skip to content

Instantly share code, notes, and snippets.

@dive
dive / fix_ios_15_simulator_spotlight_cpu.sh
Created December 16, 2021 10:35
Fix the iOS 15 Simulator high CPU usage due to the Spotlight/Suggestions Engine
#!/bin/env sh
disable_suggestions() {
if [ -d "$1" ]; then
pushd "$1" || return
find . -name com.apple.suggestions.plist \
-exec echo {} \; \
-exec plutil -replace SuggestionsAppLibraryEnabled -bool NO {} \;
popd || return
fi
@FreddieOliveira
FreddieOliveira / docker.md
Last active June 8, 2025 10:57
This tutorial shows how to run docker natively on Android, without VMs and chroot.

Docker on Android 🐋📱

Edit 🎉

All packages, except for Tini have been added to termux-root. To install them, simply pkg install root-repo && pkg install docker. This will install the whole docker suite, left only Tini to be compiled manually.


Summary

@devhammed
devhammed / countries.json
Last active May 26, 2025 05:50
Countries with Name, Dial Code, Emoji Flag and ISO Code
[
{
"name": "Afghanistan",
"flag": "🇦🇫",
"code": "AF",
"dial_code": "+93"
},
{
"name": "Åland Islands",
"flag": "🇦🇽",
@jkereako
jkereako / ReCAPTCHAViewController.swift
Created September 8, 2020 13:15
ReCAPTCHA v2 in Swift
import UIKit
import WebKit
final class ReCAPTCHAViewController: UIViewController {
private var webView: WKWebView!
private let viewModel: ReCAPTCHAViewModel
init(viewModel: ReCAPTCHAViewModel) {
self.viewModel = viewModel
@tap52384
tap52384 / README.md
Last active August 23, 2024 08:27
Install Windows on External Drive for macOS
import CreateML
import Foundation
// Datasetlerimizin bulunduğu klasörün yolunu URL tipinde bir sabite atıyoruz.
let dataSetPath = URL(fileURLWithPath: "/Users/Varol/Downloads/TurkishBanknoteDataset-master/train")
print(dataSetPath)
//Model adında bir sabit oluşturup, dataSetPath'imizi MLImageClassifier yapısına bağlıyoruz.
let model = try MLImageClassifier(trainingData: .labeledDirectories(at: dataSetPath))
@htr3n
htr3n / macos-ramdisk.md
Last active May 19, 2025 09:57
Creating RAM disk in macOS

Built-in

diskutil erasevolume HFS+ 'RAM Disk' `hdiutil attach -nobrowse -nomount ram://XXXXX`

where XXXXX is the size of the RAM disk in terms of memory blocks.

Notes:

@iband
iband / VPN_AutoConnect_MacOS_X.scpt
Created March 31, 2011 10:45
Apple Script to enable VPN autoconnect on MacOS X
on idle
tell application "System Events"
tell current location of network preferences
set myConnection to the service "VPN" #rename as your VPN connection called
if myConnection is not null then
if current configuration of myConnection is not connected then
connect myConnection
end if
end if
end tell