Skip to content

Instantly share code, notes, and snippets.

View daluu's full-sized avatar

David Luu daluu

View GitHub Profile
@2Grey
2Grey / frendlyDeviceNames.swift
Last active March 6, 2025 04:34
Friendly device name (Swift)
func frendlyDeviceNames(forModel model: String) -> String {
let frendlyNames: [String: String] = [
// * Simulator
"i386": "Simulator",
"x86_64": "Simulator",
"arm64": "Simulator",
// * Apple TV
"AppleTV1,1": "Apple TV (1Gen)",
@pschmidtboeing
pschmidtboeing / iOS_watchOS_device_types.txt
Last active February 3, 2021 13:05 — forked from adamawolf/Apple_mobile_device_types.txt
List of iOS and Watch OS device codes types a.k.a. machine ids (e.g. iPhone1,1) and their matching product names
i386 : iOS Simulator 32-bit
x86_64 : iOS Simulator 64-bit
iPhone1,1 : iPhone 1st Gen
iPhone1,2 : iPhone 3G 2nd Gen
iPhone2,1 : iPhone 3GS 3rd Gen
iPhone3,1 : iPhone 4
iPhone3,2 : iPhone 4 (GSM) Rev A
iPhone3,3 : iPhone 4 (CDMA)
iPhone4,1 : iPhone 4s
@syneart
syneart / build_wireshark.sh
Last active April 11, 2025 05:03
BUILD WIRESHARK ON UBUNTU OR DEBIAN
#!/bin/sh
# This shell script is made by SyneArt <[email protected]>
#######################################
# BUILD WIRESHARK ON UBUNTU OR DEBIAN #
#######################################
# | THIS SCRIPT IS TESTED CORRECTLY ON |
# |----------------------------------------------------------|
# | OS | Wireshark | Test | Last test |
# |--------------------|----------------|------|-------------|
@silvinaroldan
silvinaroldan / fastfile.rb
Last active September 20, 2024 22:17
CircleCI 2.0 Migration - fastfile
default_platform(:ios)
platform :ios do
before_all do
setup_circle_ci
prepare_certificates
cocoapods
end
private_lane :prepare_certificates do |options|
@silvinaroldan
silvinaroldan / config.yml
Created July 19, 2018 15:35
CircleCI 2.0 Migration - config.yml
version: 2
jobs:
build-and-test:
macos:
xcode: "9.3.0"
working_directory: ~/yourProyect
environment:
FASTLANE_LANE: all
shell: /bin/bash --login
steps:
@ernestkamara
ernestkamara / AdbCommands
Created June 26, 2018 08:42 — forked from Pulimet/AdbCommands
Adb useful commands list
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader
== Shell
@tylerneylon
tylerneylon / rwlock.py
Last active January 15, 2025 00:16
A simple read-write lock implementation in Python.
# -*- coding: utf-8 -*-
""" rwlock.py
A class to implement read-write locks on top of the standard threading
library.
This is implemented with two mutexes (threading.Lock instances) as per this
wikipedia pseudocode:
https://en.wikipedia.org/wiki/Readers%E2%80%93writer_lock#Using_two_mutexes
@shakyaabiral
shakyaabiral / redis_dump.py
Last active September 11, 2023 13:27
Python Script to dump or load data using redis
"""
Install the following requirements into your virtual environemnt
`pip install click redis`
Usage:
To load data into redis
python redis_dump.py load [filepath]
To dump data into redis
python redis_dump.py dump [filepath] --search '*txt'
@zz85
zz85 / animals.proto
Created April 27, 2018 14:16
Java Protobuf Any vs Oneof
message Dog {
}
message Cat {
}
message Elephant {
@StevenJDH
StevenJDH / battery.cs
Created April 8, 2018 11:06 — forked from ahawker/battery.cs
Battery info from win32 api
using System;
using System.IO;
using Microsoft.Win32.SafeHandles;
using System.Collections.Generic;
using System.ComponentModel;
using System.Runtime.InteropServices;
using System.Text;
namespace Test
{