This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Horrible task system - queue per thread */ | |
#include <atomic> | |
#include <condition_variable> | |
#include <deque> | |
#include <functional> | |
#include <mutex> | |
#include <thread> | |
#include <vector> | |
using namespace std; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Horrible task system */ | |
#include <condition_variable> | |
#include <deque> | |
#include <functional> | |
#include <mutex> | |
#include <thread> | |
#include <vector> | |
using namespace std; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type ServerInfoCB = FnMut(&ContextRef, Option<&ServerInfoRef>) + Send + Sync + 'static; | |
pub fn get_server_info<CB>(&self, cb: CB) -> Result<Operation> | |
where | |
CB: FnMut(&ContextRef, Option<&SourceInfo>) + Send + Sync + 'static, | |
{ | |
let userdata = Box::into_raw(Box::new(cb)) as *mut c_void; | |
let cb: ffi::pa_server_info_cb_t = Some(c_get_server_info_cb); | |
op_or_err!( | |
self, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Clone https://github.com/acreskeyMoz/browsertime_on_android_scripts | |
Apply https://paste.mozilla.org/7D9vJ6qV to `mozilla-central` | |
Download APKs: | |
Fennec: archive.mozilla.org/pub/mobile/releases/68.3.0/android-aarch64/multi/fennec-68.3.0.multi.android-aarch64.apk | |
Fenix: https://firefox-ci-tc.services.mozilla.com/api/index/v1/task/project.mobile.fenix.v2.fennec-production.2020.02.08.latest/artifacts/public/build/arm64-v8a/geckoBeta/target.apk | |
Geckodriver: https://github.com/mozilla/geckodriver/releases/download/v0.26.0/geckodriver-v0.26.0-macos.tar.gz | |
Customize run_android.py | |
Apply sites.txt.weekly to ~/Mozilla/browsertime_on_android_scripts/sites.txt | |
./mach browsertime --setup | |
./mach browsertime --script ../browsertime_on_android_scripts/run_android.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0.17 │ xor ebp,ebp ▒ | |
1.77 │ nop ▒ | |
6.54 │150:┌─→cmp r12,rbp ▒ | |
│ │↓ je 170 ▒ | |
│ │_ZN4core4iter8adapters13copy_try_fold28_$u7b$$u7b$closure$u7d$$u7d$17h5801f96c3ce42993E(): ▒ | |
1.49 │ │ mov edi,DWORD PTR [r9+rbp*1] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct Alu { | |
pub sel: Signal, | |
pub a: Signal, | |
pub b: Signal, | |
pub o: Signal, | |
pub co: Signal, | |
} | |
impl Alu { | |
#[fhdl] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct Alu { | |
pub sel: Signal, | |
pub a: Signal, | |
pub b: Signal, | |
pub o: Signal, | |
pub co: Signal, | |
} | |
impl Alu { | |
#[fhdl] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void nsRefreshDriver::Tick(VsyncId aId, TimeStamp aNowTime) { | |
MOZ_ASSERT(!nsContentUtils::GetCurrentJSContext(), | |
"Shouldn't have a JSContext on the stack"); | |
if (nsNPAPIPluginInstance::InPluginCallUnsafeForReentry()) { | |
NS_ERROR("Refresh driver should not run during plugin call!"); | |
// Try to survive this by just ignoring the refresh tick. | |
return; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Paste into shadertoy. | |
void mainImage( out vec4 fragColor, in vec2 fragCoord ) | |
{ | |
vec2 c = (2.0*iMouse.xy - iResolution.xy)/iResolution.y; | |
vec2 p = (-iResolution.xy + 2.0*fragCoord)/iResolution.y; | |
vec2 d = c - p; | |
// angle of each pixel to the center offset by from | |
float from = radians(mod(10.0*iTime,360.0)); | |
float a = (atan(d.x, d.y) + radians(180.0) - from)/radians(360.0); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// snippet of code @ 2019-01-03 09:34:24 | |
// === Rust Playground === | |
// This snippet is in: ~/.emacs.d/rust-playground/at-2019-01-03-093424/ | |
// Execute the snippet: C-c C-c | |
// Delete the snippet completely: C-c k | |
// Toggle between main.rs and Cargo.toml: C-c b | |
use std::{ |