Skip to content

Instantly share code, notes, and snippets.

View philip-lamb's full-sized avatar

Philip Lamb philip-lamb

  • Moonbeam, Inc.
  • Christchurch, New Zealand
  • X @nzphil76
View GitHub Profile
#! /bin/bash
#
# Script to collect Windows dependent dynamic libraries.
# Run under a Cygwin or Windows Subsystem for Linux bash shell.
#
# Author(s): Philip Lamb
#
# Get our location.
@philip-lamb
philip-lamb / egl_bindings.rs
Created January 14, 2021 02:09
The generated libsimpleservo EGL bindings on Windows UWP using the 'struct' gl_generator.
mod __gl_imports {
pub use std::mem;
pub use std::marker::Send;
pub use std::os::raw;
}
pub mod types {
#![allow(non_camel_case_types, non_snake_case, dead_code, missing_copy_implementations)]
@philip-lamb
philip-lamb / egl_bindings.rs
Last active January 13, 2021 05:14
The generated libsimpleservo EGL bindings on Windows UWP using the 'static struct' gl_generator.
mod __gl_imports {
pub use std::mem;
pub use std::os::raw;
}
pub mod types {
#![allow(non_camel_case_types, non_snake_case, dead_code, missing_copy_implementations)]
#! /bin/bash
#
# Script to collect macOS dependent dynamic libraries outside system paths.
#
# Author(s): Philip Lamb
#
# Get our location.
OURDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
@philip-lamb
philip-lamb / github-wiki-git-log
Created May 17, 2019 04:25
Format a git log for inclusion in a GitHub wiki
git log --first-parent --pretty="format:* [\`%h\`](/mozillareality/firefoxreality/commit/%h) %s" 1.1.4c..HEAD | sed -E -e 's/\(#([0-9]+)\)$/[\`#\1\`](\/mozillareality\/firefoxreality\/pull\/\1)/g'
@philip-lamb
philip-lamb / merge_static_libs.sh
Last active August 28, 2021 22:34
Bash script to merge static libraries together, useable for macOS, iOS, Android and Linux libraries.
#! /bin/bash
#
# Usage ./merge_static_libs.sh [--prefix <prefix>] [--ext <ext>] [--indir <indir>] [--target_platform macos|ios|android|linux] [--android_toolchain <toolchain> outlib inlib1 [inlib2] [inlib3] [...]
# <prefix> defaults to 'lib', <ext> defaults to '.a', <indir> defaults to '.'
# <toolchain> defaults to "arm-linux-androideabi". Other options: "aarch64-linux-android", "x86", "x86_64", "mipsel-linux-android", "mips64el-linux-android".
#
#
@philip-lamb
philip-lamb / assert_ndk_version.sh
Last active June 8, 2016 00:18 — forked from jorgenpt/assert_ndk_version.sh
Shell script to check for Android NDK version.
#!/bin/bash
# Bash script to assert that the current version of the NDK is at least the
# specified version. Prints 'true' to standard out if it's the right version,
# 'false' if it's not.
#
# Typically used like this, in your jni/Android.mk:
#
# ifneq ($(shell $(LOCAL_PATH)/assert_ndk_version.sh "r5c"),true)
# $(error NDK version r5c or greater required)