This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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; | |
} |
OlderNewer