Skip to content

Instantly share code, notes, and snippets.

View MacKentoch's full-sized avatar
👨‍💻

Erwan DATIN MacKentoch

👨‍💻
  • France
View GitHub Profile
@MacKentoch
MacKentoch / App-re-signing.md
Created December 11, 2022 09:59 — forked from mattio/App-re-signing.md
Re-signing an .ipa file for iOS distribution

Re-signing an .ipa file for iOS distribution

There are several apps I currently have to re-sign. They are apps built by various outside vendors who do not want to share the source code, but we want the apps published from our account and we do not want to give them our certificate or access to publish the apps on our behalf. ¯\_(ツ)_/¯ These are the steps I use to re-sign them. I've decided to keep the steps manual because, frankly, it's an error-prone process, something done infrequently, and a moving target. Some detail always seems to shift with every major Xcode release or App Store change.

These steps are current as of iOS 14 and Xcode 12. They assume you already have your Distribution Certificate installed in Keychain.


I'm going to use an example named "Matt's App.ipa". If you need to provide instructions to a vendor to deliver this file to you properly, I've included what I use below.

@MacKentoch
MacKentoch / React Navigation Shared Element Transitions.md
Created March 3, 2022 04:57 — forked from nandorojo/React Navigation Shared Element Transitions.md
Shared Element Transitions with React Navigation and Expo (2019)

Shared Element Transitions with React Navigation and Expo (2019)

It's 2019, and creating smooth shared element transitions in react native (& expo!) is finally easy.

Ideally, as Pablo Stanley suggests, your app's navigation will use these shared transitions for similar components that appear across screens.

Is it possible to achieve the great experience above using react-native/expo? Now it is.

@MacKentoch
MacKentoch / shell_try_catch.sh
Created May 14, 2021 06:52 — forked from YakDriver/shell_try_catch.sh
Bash Basics: A Robust try/catch/finally for shell scripts
#!/bin/bash
# This script uses traps to create try/catch/finally functionality in shell scripts.
#
# OUTPUT:
#
# Hello! We're reporting live from script
# ./try_catch2.sh: line 23: badcommand: command not found
# ./try_catch2.sh: line 23: exiting with status 127
# It's the end of the line
@MacKentoch
MacKentoch / kali_osx_persistence_wifi.md
Created April 6, 2021 18:50 — forked from widdowquinn/kali_osx_persistence_wifi.md
Kali Linux Live USB with persistence and wireless on Macbook Pro

Kali Linux Bootable USB with Persistence and Wireless on OSX

Download the appropriate Kali Linux .iso

I used a 64 bit .iso image, downloaded via HTTP. I downloaded the amd64 weekly version, as the pool linux headers (needed below for installation of wireless drivers) were ahead of the stable release kernel.

Download the SHA256SUMS and SHA256SUMS.gpg files from the same location.

#!/bin/sh
# Make an android app debugabble and reinstall
set -ex
DNAME="CN=Ross Patterson, OU=me, O=rpatterson.net, L=San Francisco, ST=CA, C=US"
PACKAGE_RE='^package:(/data/app/([^-]+)-.+==/(.+.apk))=.+'
MANIFEST_RE='(<application [^>]+)>'
export PATH=$HOME/Android/Sdk/platform-tools:$PATH
@MacKentoch
MacKentoch / ImageRotator.java
Created November 13, 2019 08:59 — forked from tomogoma/ImageRotator.java
Android code to rotate an image based on exif information
// imports
public class ImageRotator {
public static Bitmap rotateImage(String path) throws IOException {
Bitmap bitmap = BitmapFactory.decodeFile(path);
return rotateImage(bitmap);
}
public static Bitmap rotateImage(Bitmap bitmap) throws IOException {
int rotate = 0;
@MacKentoch
MacKentoch / RNMultipleTargetsInstructions.md
Created August 6, 2019 13:44 — forked from jacks205/RNMultipleTargetsInstructions.md
Settings up multiple app targets in React-Native
@MacKentoch
MacKentoch / readme.md
Created July 22, 2019 03:28 — forked from coolaj86/how-to-publish-to-npm.md
How to publish packages to NPM

Getting Started with NPM (as a developer)

If you haven't already set your NPM author info, now you should:

npm set init.author.name "Your Name"
npm set init.author.email "you@example.com"
npm set init.author.url "http://yourblog.com"

npm adduser

@MacKentoch
MacKentoch / android-adb-pull-apk.md
Created February 11, 2019 13:51 — forked from ctrl-freak/android-adb-pull-apk.md
Retrieve APK from Non-Rooted Android Device through ADB

https://stackoverflow.com/a/18003462/348146

None of these suggestions worked for me, because Android was appending a sequence number to the package name to produce the final APK file name (this may vary with the version of Android OS). The following sequence of commands is what worked for me on a non-rooted device:

  1. Determine the package name of the app, e.g. com.example.someapp. Skip this step if you already know the package name.

    adb shell pm list packages

    Look through the list of package names and try to find a match between the app in question and the package name. This is usually easy, but note that the package name can be completely unrelated to the app name. If you can't recognize the app from the list of package names, try finding the app in Google Play using a browser. The URL for an app in Google Play contains the package name.

@MacKentoch
MacKentoch / Alamofire-JSON-Serialization.md
Created July 11, 2018 16:16 — forked from jpotts18/Alamofire-JSON-Serialization.md
Alamofire JSON Serialization of Objects, Collections, Nesting

Alamofire JSON Serialization of Objects and Collections

Alamofire is a great Swift library developed by the creator of AFNetworking @mattt. The purpose of this gist is to explain how to use the built-in power of Alamofire to serialize your JSON. In this example we will be serializing a simple blog API. First we will start with serializing a single JSON object and add complexity as we go along.

Warning: This was written before Swift 1.2

A Single JSON Serialization

This is the first JSON object that we will be serializing.