Skip to content

Instantly share code, notes, and snippets.

@darklinden
darklinden / re-sign-ios-app.md
Last active August 7, 2016 02:03 — forked from chaitanyagupta/re-sign-ios-app.md
How to re-sign an iOS app with another developer account

To re-sign an iOS app with another developer account, ensure that the following are in place first.

  1. Distribution certificate of the other developer account
  2. A provisioning profile from the other developer account

Note that the Apple requires bundle IDs to be globally unique, even across accounts. So a bundle ID i.e. CFBundleIdentifier from one account can't be used in a different account, even though the team id/prefix would be different.

Ensure that the new distribution certificate is in your keychain and the new provisioning profile on your disk.

  1. Unzip the .ipa. This will usually unzip to Payload/.app/
@darklinden
darklinden / MyQuaternion.cs
Created May 14, 2022 01:45 — forked from JakubNei/MyQuaternion.cs
A custom completely managed implementation of UnityEngine.Quaternion. Base is decompiled UnityEngine.Quaternion. Doesn't implement methods marked Obsolete. Does implicit coversions to and from UnityEngine.Quaternion
using System;
using UnityEngine.Internal;
using UnityEngine;
using System.Runtime.Serialization;
using System.Xml.Serialization;
/// <summary>
/// Quaternions are used to represent rotations.
/// A custom completely managed implementation of UnityEngine.Quaternion
/// Base is decompiled UnityEngine.Quaternion
@darklinden
darklinden / float-unrepresentable-in-integer-range.md
Created February 7, 2023 04:17
Unity-WEBGL exception: float unrepresentable in integer range
@darklinden
darklinden / Install_Nodejs_16_on_CentOS.md
Last active February 14, 2023 02:49
How To Install Node.js 16 on CentOS 8 | CentOS 7

How To Install Node.js 16 on CentOS 8 | CentOS 7

from https://techviewleo.com/install-node-js-on-centos-linux/

  • Node.js packages are provided through the NodeSource Node.js Binary Distributions via .rpm. Add the repository to the system using the commands below:

    curl -fsSL https://rpm.nodesource.com/setup_16.x | sudo bash -

  • Tencent OpenCloudOS is not in the supported list

@darklinden
darklinden / configure centos7 network.md
Last active March 4, 2023 09:42
Configure CentOS 7 Network Settings And Dnsmasq
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>sleepy.caffeinate</string>
<key>LimitLoadToSessionType</key>
<array>
<string>Aqua</string>
<string>Background</string>
@darklinden
darklinden / docker-letsencrypt.sh
Created July 4, 2023 03:25
use docker to generate https cert
rm -rf config
mkdir config
docker run --rm \
--name=swag \
--cap-add=NET_ADMIN \
-e PUID=1000 \
-e PGID=1000 \
-e TZ=Europe/London \
-e URL=$2 \
@darklinden
darklinden / use_venv.sh
Created July 16, 2023 00:53
shell for enable venv and add pwd to PYTHONPATH
#!/bin/bash
GLOBAL_PYTHON=$(which python3.10)
if [ -z "$GLOBAL_PYTHON" ]; then
GLOBAL_PYTHON=$(which python3)
fi
echo "Using global python: $GLOBAL_PYTHON"
CWD=$(pwd)
@darklinden
darklinden / sd-webui.service
Created July 20, 2023 03:00
Start Service For stable-diffusion-webui
# /etc/systemd/system/sd-webui.service
[Service]
ExecStart=/bin/bash /home/ubuntu/stable-diffusion-webui/webui.sh --listen --api
Restart=always
WorkingDirectory=/home/ubuntu/stable-diffusion-webui
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=sd-webui
@darklinden
darklinden / main.rs
Created April 24, 2024 01:55
Is there a better algorithm for grouping projects by activity timeframe?
use std::collections::{HashMap, HashSet};
#[derive(Clone, Debug)]
struct Item {
start: i64,
end: i64,
id: i32,
}
impl Item {