Skip to content

Instantly share code, notes, and snippets.

View derme302's full-sized avatar

Chris derme302

View GitHub Profile
@derme302
derme302 / gitlab_group_mirror.py
Created November 13, 2023 07:04
[Bing AI/ChatGPT] Mirror a GitLab group to a GitLab group on another instance
import gitlab
from git import Repo
import subprocess
# Source GitLab instance
source_url = 'https://source.gitlab.com'
source_token = 'your-source-token'
source_group_id = 1234
# Destination GitLab instance
@derme302
derme302 / detect_notch.gml
Created January 16, 2024 20:39
Handle Notched Phones in GameMaker by ChatGPT4
// This function returns true if the device has a notch, false otherwise
function device_has_notch()
{
// Get the device model name
var device_model = device_get_model();
// Check if the device model is one of the known notched iPhones
var notched_iphones = ["iPhone X", "iPhone XS", "iPhone XS Max", "iPhone XR", "iPhone 11", "iPhone 11 Pro", "iPhone 11 Pro Max", "iPhone 12", "iPhone 12 Mini", "iPhone 12 Pro", "iPhone 12 Pro Max"];
return array_find_index(notched_iphones, device_model) != -1;
}