Skip to content

Instantly share code, notes, and snippets.

@paulrouget
paulrouget / ff.md
Last active November 21, 2021 21:13
Hacking Firefox
@paulrouget
paulrouget / demo.html
Created September 4, 2019 11:58
babylonjs webxr basic demo
<!DOCTYPE html>
<html>
<head>
<script src="https://code.jquery.com/pep/0.4.2/pep.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/dat-gui/0.6.2/dat.gui.min.js"></script>
<script src="https://preview.babylonjs.com/ammo.js"></script>
<script src="https://preview.babylonjs.com/cannon.js"></script>
<script src="https://preview.babylonjs.com/Oimo.js"></script>
<script src="https://preview.babylonjs.com/gltf_validator.js"></script>
<script src="https://preview.babylonjs.com/earcut.min.js"></script>
@paulrouget
paulrouget / .tmux.conf
Created January 27, 2012 17:37
Paul's configurations files
set -g default-terminal "screen-256color"
set -g status-utf8 on
bind M source-file ~/.tmux/mac.session
bind L source-file ~/.tmux/linux.session
# set -g terminal-overrides 'xterm*:smcup@:rmcup@'
# THEME
set -g status-bg black
Compiling script v0.0.1 (/Users/paul/git/servo/components/script)
Completed script v0.0.1 custom-build (run) in 6.4s
Compiling layout_thread_2013 v0.0.1 (/Users/paul/git/servo/components/layout_thread)
Compiling libservo v0.0.1 (/Users/paul/git/servo/components/servo)
Completed layout_thread_2013 v0.0.1 in 7.7s
Completed libservo v0.0.1 in 7.6s
Completed script v0.0.1 in 137.1s
Compiling servo v0.0.1 (/Users/paul/git/servo/ports/glutin)
error: linking with `cc` failed: exit code: 1
|
@paulrouget
paulrouget / scratchpad.js
Created November 2, 2012 17:59
Floating scrollbars in Firefox
/**
* How to have floating scrollbars in Firefox (Linux, Windows & Mac).
* Screenshot: http://i.imgur.com/bn44L.png
* You need Firefox > 18. Just run this code in a browser-scratchpad:
*
* Ping me on Twitter (@paulrouget) if you run into problems.
*
* 1. Go to about:config - Set devtools.chrome.enabled to true
* 2. Starts Scratchpad (Shift-F4)
* 3. In Scratchpad's menubar, check "Environment > Browser"
#include <stdarg.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
/**
* Servo options
*/
typedef struct {
const char *args;
Bindgen generates this struct:
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pthread_mutex_t {
pub value: ::std::os::raw::c_int,
}
That's valid and it works, but everytime I want to use
this `pthread_mutex_t` type with `libc::pthread_mutex_lock()`
impl VRDisplay for VRExternalDisplay {
fn data(&self) -> VRDisplayData {
let mut data = VRDisplayData::default();
let state: &mozgfx::VRDisplayState = &self.shmem().state.displayState;
data.display_name = state.mDisplayName.iter().map(|x| *x as char).collect();
data.display_id = self.display_id;
data.connected = state.mIsConnected;
// FIXME: better option than != 0?
mozconfig:
# Build Firefox for Android Artifact Mode:
ac_add_options --enable-application=mobile/android
ac_add_options --target=arm-linux-androideabi
ac_add_options --enable-artifact-builds
# With the following java and javac:
ac_add_options --with-java-bin-path="/Library/Java/Home/bin"
# With the following Android SDK:
ac_add_options --with-android-sdk="/Users/paul/.mozbuild/android-sdk-macosx"