Skip to content

Instantly share code, notes, and snippets.

View larsbergstrom's full-sized avatar

Lars Bergstrom larsbergstrom

View GitHub Profile
// Each value can be set independently meaning you can change resolution without changing FPS and vice versa
// we default to(1024x1024 @ 60fps w/ 5000000 bitrate (5Mbps) in the absence of setprops
adb shell setprop debug.oculus.capture.width 1920
adb shell setprop debug.oculus.capture.height 1080
adb shell setprop debug.oculus.capture.fps 30
adb shell setprop debug.oculus.capture.bitrate 10000000
// You probably want to change the FOV to match the 1080p resolution as well:
adb shell setprop debug.oculus.eyeFovDown 39
adb shell setprop debug.oculus.eyeFovUp 38
adb shell setprop debug.oculus.eyeFovOutward 50
@larsbergstrom
larsbergstrom / teleport errors
Created June 17, 2020 14:58
teleport errors
Content Security Policy: The page’s settings blocked the loading of a resource at inline (“script-src”). content.js:21:460436
A-Frame Version: https://github.com/MozillaReality/aframe index.js:84
three Version: https://github.com/MozillaReality/three.js index.js:85
WebVR Polyfill Version: ^0.10.10 index.js:86
core:schema:warn Default value `null` does not match type `string` in component `media-loader` 3 browser.js:111
core:schema:warn Default value `null` does not match type `string` in component `camera-focus-button` browser.js:111
core:schema:warn Default value `null` does not match type `string` in component `emit-scene-event-on-remove` browser.js:111
core:schema:warn Default value `[object Object]` does not match type `string` in component `pen` browser.js:111
core:schema:warn Default value `[object Object]` does not match type `string` in component `pen-laser` 3 browser.js:111
@larsbergstrom
larsbergstrom / delete week gcal
Created January 24, 2020 13:32
Delete a week in gcal
function cleanup()
{
var fromDate = new Date(2017,11,12,0,0,0);
var toDate = new Date(2017,11,16,0,0,0);
var calendarName = 'Mozilla';
var calendar = CalendarApp.getCalendarsByName(calendarName)[0];
var events = calendar.getEvents(fromDate, toDate);
for(var i=0; i<events.length;i++){
var ev = events[i];
At a high level, not very hard to lift and put in servo (despite not touching in 2 years)
Nicely asynchronous
Depends a bit on XPCOM threading stuff, but most of the explicit stuff is non-XPCOM
May want to pull in or not, as needed
abstraction boundray is between media decoder and HTMLMediaelement
it's teh main-thread media state stuff
that communicates with the HTMLMediaElement
the decoder is then async with the state machine on its own thread
and the decoder itself has async links with all the platform stuff
which is all under it
Compiling servo v0.0.1 (file:///run/shm/tmp/servo/components/servo)
error: linking with `cc` failed: exit code: 1
note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-L" "/home/ubuntu/.servo/rust/2016-01-31/rustc-nightly-x86_64-unknown-linux-gnu/rustc/lib/rustlib/x86_64-unknown-linux-gnu/lib" "/run/shm/tmp/servo/target/debug/servo.0.o" "-o" "/run/shm/tmp/servo/target/debug/servo" "-Wl,--gc-sections" "-pie" "-nodefaultlibs" "-L" "/run/shm/tmp/servo/target/debug" "-L" "/run/shm/tmp/servo/target/debug/deps" "-L" "/run/shm/tmp/servo/target/debug/build/angle-ee9dc8911de0d6f3/out" "-L" "/run/shm/tmp/servo/target/debug/build/azure-619033e514f5eadc/out" "-L" "/usr/lib/x86_64-linux-gnu" "-L" "/run/shm/tmp/servo/target/debug/build/harfbuzz-sys-14497f51d6b45da3/out/lib" "-L" "/run/shm/tmp/servo/target/debug/build/hbs-pow-sys-cf8ae81d4cf55502/out/_build/lib" "-L" "/run/shm/tmp/servo/target/debug/build/js-b63ddf1f18d33225/out" "-L" "/usr/lib/x86_64-linux-gnu" "-L" "/run/shm/tmp/servo/target/debug/build/miniz-sys-
Compiling servo v0.0.1 (file:///run/shm/tmp/servo/components/servo)
error: linking with `cc` failed: exit code: 1
note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-L" "/home/ubuntu/.servo/rust/2016-01-31/rustc-nightly-x86_64-unknown-linux-gnu/rustc/lib/rustlib/x86_64-unknown-linux-gnu/lib" "/run/shm/tmp/servo/target/debug/servo.0.o" "-o" "/run/shm/tmp/servo/target/debug/servo" "-Wl,--gc-sections" "-pie" "-nodefaultlibs" "-L" "/run/shm/tmp/servo/target/debug" "-L" "/run/shm/tmp/servo/target/debug/deps" "-L" "/run/shm/tmp/servo/target/debug/build/angle-ee9dc8911de0d6f3/out" "-L" "/run/shm/tmp/servo/target/debug/build/azure-619033e514f5eadc/out" "-L" "/usr/lib/x86_64-linux-gnu" "-L" "/run/shm/tmp/servo/target/debug/build/harfbuzz-sys-14497f51d6b45da3/out/lib" "-L" "/run/shm/tmp/servo/target/debug/build/hbs-pow-sys-cf8ae81d4cf55502/out/_build/lib" "-L" "/run/shm/tmp/servo/target/debug/build/js-b63ddf1f18d33225/out" "-L" "/usr/lib/x86_64-linux-gnu" "-L" "/run/shm/tmp/servo/target/debug/build/miniz-sys-
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
This program built for x86_64-pc-linux-gnu
Reading makefiles...
Reading makefile `makefile.cargo'...
Updating goal targets....
@larsbergstrom
larsbergstrom / gist:8552351
Created January 22, 2014 02:10
more debugging code
let ptr: (*CrateMap) = sym as *CrateMap;
if ptr.is_null() {
println!("Failed2 to load crate map");
return None;
} else {
println!("Loaded crate map.");
unsafe {
return Some(transmute(sym));
}
}
@larsbergstrom
larsbergstrom / main.cpp
Created January 20, 2014 02:07
Additional diffs for Servo Android support
diff --git a/jni/main.cpp b/jni/main.cpp
index 34831f8..a881911 100644
--- a/jni/main.cpp
+++ b/jni/main.cpp
@@ -17,8 +17,10 @@
#include <jni.h>
#include <errno.h>
+#include <pthread.h>
#include <string.h>
@larsbergstrom
larsbergstrom / gist:8500224
Created January 19, 2014 03:40
rust crash android
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 28071]
rust_is_ipv4_sockaddr (addr=0x0) at /Users/larsberg/servo-arm/src/compiler/rust/src/rt/rust_uv.c:126
126 return addr->sa_family == AF_INET;
(gdb) bt
#0 rust_is_ipv4_sockaddr (addr=0x0) at /Users/larsberg/servo-arm/src/compiler/rust/src/rt/rust_uv.c:126
#1 0x74a36518 in net::sockaddr_to_socket_addr::h884db1f919054ed8ax::v0.9 ()
from /Users/larsberg/servo-arm/src/platform/android/servo-android-glue/libs/armeabi/librustuv-2ba3695a-0.9.so
#2 0x74a36518 in net::sockaddr_to_socket_addr::h884db1f919054ed8ax::v0.9 ()