Skip to content

Instantly share code, notes, and snippets.

@ryantan
ryantan / resign-ipa.md
Last active January 1, 2025 23:03
How to resign an .ipa

How to Resign an iOS App

Let's say you receive an app (e.g. MyApp.ipa) from another developer, and you want to be able to install and run it on your devices (by using ideviceinstaller, for example).

Or your certificates and provision profiles have expired and you want to provide a new build to your clients without having to make a new build on the latest XCode or iOS SDK.

Prepare New Signing Assets

The first step is to attain a Provisioning Profile which includes all of the devices you wish to install and run on. Ensure that the profile contains a certificate that you have installed in your Keychain Access (e.g. iPhone Developer: Some Body (XXXXXXXXXX) ). Download the profile (MyProfile.mobileprovision) so you can replace the profile embedded in the app.

@retronym
retronym / diff.diff
Last active March 21, 2019 22:35
Graal CE vs EE config options
--- graal-ce-config.txt 2018-05-23 13:52:18.000000000 +1000
+++ graal-ee-config.txt 2018-05-23 13:52:34.000000000 +1000
@@ -1,11 +1,11 @@
-scala@scalabench:/usr/lib/jvm$ /usr/lib/jvm/graalvm-ce-1.0.0-rc1/bin/java -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -XX:+JVMCIPrintProperties -version
+scala@scalabench:/usr/lib/jvm$ /usr/lib/jvm/graalvm-1.0.0-rc1/bin/java -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -XX:+JVMCIPrintProperties -version
[JVMCI properties]
jvmci.Compiler := "graal" [String]
Selects the system compiler. This must match the getCompilerName() value returned by a jdk.vm.ci.runtime.JVMCICompilerFactory provider. An empty string or the value "null" selects a compiler that will raise an exception upon receiving a compilation request. This property can also be defined by the contents of <java.home>/lib/jvmci/compiler-name.
jvmci.InitTimer = false [Boolean]
Specifies i
@tonyxu-io
tonyxu-io / linedin-login-sample-code.html
Last active August 8, 2020 13:23
Linkedin Login Sample Code #snippet
<!DOCTYPE html>
<html>
<head>
<title>Linkedin Demo</title>
<meta charset="utf-8">
<script type="text/javascript" src="//platform.linkedin.com/in.js">
api_key: 86012 cynxvvidr
onLoad: checkAuthentication
authorize: true
@raphw
raphw / Main.java
Last active May 9, 2018 19:07
Method handle invoke special
package main;
import bar.Bar;
import qux.Qux;
import java.lang.invoke.MethodHandles;
import java.lang.invoke.MethodType;
import java.lang.reflect.Proxy;
import java.util.function.Consumer;
@nomisRev
nomisRev / HeliosConverterFactory.kt
Last active August 4, 2018 19:36
Retrofit Call Adapter
import arrow.InstanceParametrizedType
import arrow.instance
import retrofit2.Converter
import okhttp3.ResponseBody
import helios.core.Json
import retrofit2.Retrofit
import java.lang.reflect.Type
import okhttp3.RequestBody
import helios.typeclasses.Encoder
import okhttp3.MediaType
@bamboo
bamboo / build.gradle.kts
Last active April 21, 2021 18:20
Gradle ArtifactTransform example using the Gradle Kotlin DSL
import org.gradle.api.internal.artifacts.repositories.layout.IvyRepositoryLayout
import java.io.InputStream
import java.util.zip.*
object Attributes {
val artifactType = Attribute.of("artifactType", String::class.java)
val zipType = "zip"
val jars = "jars"
}
@valentyn-zaitsev
valentyn-zaitsev / intToByteArray.java
Last active April 9, 2025 00:42
Int to Byte array (java)
public static final byte[] intToByteArray(int value) {
return new byte[] {
(byte)(value >>> 24),
(byte)(value >>> 16),
(byte)(value >>> 8),
(byte)value};
}
public static byte[] intToByteArray(int value) {
@akanshgulati
akanshgulati / tasks.md
Last active April 23, 2025 01:43
Visual Studio Code task to compile and run C programs

Introduction

The below code is the configuration for the Microsoft Visual Code tasks which will enable you to compile and run C program

Steps

  1. Press Cmd + Shift + P
  2. Type Configure task ( A task.json file will be created for that project )
  3. Copy below configuration code and save it.

Usage

Simple press Cmd + Shift + B to compile and run.

Note: Make sure you select the tab having C program as below tasks run on active tab in VS Code.

#!/usr/bin/env python3
import gzip
import os
import shutil
import subprocess
import tarfile
import zipfile
from defusedxml import ElementTree
import yaml