Dipin krishna
Find the expiry of a Certificate that was used to sign an .ipa App file
Extract the ipa file: $ unzip -q App.ipa Extract Certificates: $ codesign -d –extract-certificates Payload/*.app $ openssl x509 -inform DER -in codesign0 -out codesign0.pem $ openssl x509 -inform DER -in codesign1 -out codesign1.pem $ openssl x509 -inform DER -in codesign2 -out codesign2.pem $ cat codesign1.pem codesign2.pem > cachain.pem Check the validity of the certificate: $… Read More »Find the expiry of a Certificate that was used to sign an .ipa App file

How to upgrade Ubuntu server 20.04 to Ubuntu 22.04 (latest)
1. Let’s fetch the latest version of the package list from the repositories. sudo apt update 2. Upgrade the installed packages. sudo apt upgrade 3. Upgrade the distribution and reboot the server. sudo apt dist-upgrade sudo reboot 4. Let’s make sure we have the Update Manager Core installed. sudo apt install update-manager-core 5. Let’s make… Read More »How to upgrade Ubuntu server 20.04 to Ubuntu 22.04 (latest)
How to Convert a Apple Certificate .p12 file to a PEM File
To convert PKCS#p12 file to a PEM file, use: openssl pkcs12 -in cert.p12 -out cert.pem -nodes -clcerts Now you will have both the certificate and key in the cert.pem file without a password. If you need the certificate and key in separate files, use this: openssl pkcs12 -in cert.p12 -out cert.pem -clcerts -nokeys openssl pkcs12… Read More »How to Convert a Apple Certificate .p12 file to a PEM File

Python: Add Two Numbers – Linked List
You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contains a single digit. Add the two numbers and return it as a linked list. You may assume the two numbers do not contain any leading zero, except the number 0 itself.… Read More »Python: Add Two Numbers – Linked List

Python: Two Sum Problem
Given an array of integers, return indices of the two numbers such that they add up to a specific target. The below python code will return the first solution found, and assumes that no element appears twice. def twoSum(nums, target): “”” :type nums: List[int] :type target: int :rtype: List[int] “”” index_map = {} for i… Read More »Python: Two Sum Problem

Python: Stack with Push, Pop and seek Minimum Value with O(1)
Pyhton 3 code to implement a stack with push, pop and seekMin function with time complexity of O(1) class Stack: def __init__(self): self.items = [] self.minList = [] self.min = None def push(self, item): print(“Push: “, item) self.items.append(item) if not self.min: self.min = item else: if item