Skip to content

Instantly share code, notes, and snippets.

Initialization

UniTaskLoopRunnerYieldInitialization
UniTaskLoopRunnerInitialization
PlayerUpdateTime
DirectorSampleTime
AsyncUploadTimeSlicedUpdate
SynchronizeInputs
SynchronizeState
XREarlyUpdate

@katowulf
katowulf / print_ip_and_headers.js
Last active September 13, 2024 03:12
Print IP address and headers in Cloud Functions
const functions = require('firebase-functions');
const util = require('util');
exports.helloWorld = functions.https.onRequest((req, res) => {
// For Firebase Hosting URIs, use req.headers['fastly-client-ip']
// For callable functions, use rawRequest
// Some users have better success with req.headers['x-appengine-user-ip']
const ipAddress = req.headers['x-forwarded-for'] || req.connection.remoteAddress;
const headers = JSON.stringify(req.headers, null, 2);
const message = util.format("<pre>Hello world!\n\nYour IP address: %s\n\nRequest headers: %s</pre>", ipAddress, headers);
@greencoder
greencoder / apns.sh
Created May 11, 2016 17:04
Curl the APNS http/2 API
# Note: You MUST have curl 7.47+ with http/2 support compiled in
curl -v \
-d '{"aps":{"alert":"<message>","badge":42}}' \
-H "apns-topic: <bundle id>" \
-H "apns-priority: 10" \
--http2 \
--cert <certificate file> \
https://api.development.push.apple.com/3/device/<device token>
@PeterLi
PeterLi / Apple OSX "Create NAT64 Network" to help test IPv6 is just not working for my laptop or computer or iPhone or iPad devices - SOLVED.txt
Last active February 6, 2020 06:33
Apple OSX "Create NAT64 Network" to help test IPv6 is just not working for my laptop or computer or iPhone or iPad devices - SOLVED
Overview:
=========
So you want to test your application, whether it be desktop, mobile or tablet for IPv6 compatibility.
Apple make this easy as OSX has a nice hidden feature to enable your Apple laptop to create an IPv6 ONLY personal hotspot by sharing your existing (IPv4) internet connection. The problem is, you follow the instructions, but it is JUST NOT WORKING for you!
Well, if you are like me and you spent way longer than you would have wanted, trying to get this working, this snippet of info may save you some time.
Reference:
==========
@lacostej
lacostej / android_set_manifest.sh
Created March 29, 2012 08:51
A script to post process the AndroidManifest.xml using apktool
# taken from http://forum.unity3d.com/threads/84953-Android-Permissions-and-the-Manifest.xml
#
if [ $# -ne 3 ]; then
echo "ERROR Missing argument"
echo "Usage: $0 file.apk newmanifest.xml target.apk"
exit -1
fi
APK=$1
MANIFEST=$2