Skip to content

Instantly share code, notes, and snippets.

function urlWrangle(aUrlStr) {
const ioService = Cc["@mozilla.org/network/io-service;1"]
.getService(Ci.nsIIOService);
let uri = ioService.newURI(aUrlStr);
if (uri.schemeIs("resource")) {
const ph = ioService.getProtocolHandler("resource")
.QueryInterface(Ci.nsISubstitutingProtocolHandler);
uri = ioService.newURI(ph.resolveURI(uri));
} else if (uri.schemeIs("chrome")) {
#[macro_use]
extern crate serde_derive;
extern crate serde;
extern crate serde_json;
use std::collections::HashMap;
#[derive(Debug, Serialize, Deserialize)]
#[serde(untagged)]
enum Chicken {
Sandbox: Failed errno -2 op 0 flags 02000000 path /home/jld/src/obj.gecko-dev/obj-x86_64-pc-linux-gnu/dist/bin/libGL.so.1
Sandbox: Failed errno -2 op 1 flags 00 path /etc/ld.so.nohwcap
Sandbox: Failed errno -2 op 0 flags 02000000 path /home/jld/src/obj.gecko-dev/obj-x86_64-pc-linux-gnu/dist/bin/libxcb-dri3.so.0
Sandbox: Failed errno -2 op 1 flags 00 path /etc/ld.so.nohwcap
Sandbox: Failed errno -2 op 0 flags 02000000 path /home/jld/src/obj.gecko-dev/obj-x86_64-pc-linux-gnu/dist/bin/libxcb-present.so.0
Sandbox: Failed errno -2 op 1 flags 00 path /etc/ld.so.nohwcap
Sandbox: Failed errno -2 op 0 flags 02000000 path /home/jld/src/obj.gecko-dev/obj-x86_64-pc-linux-gnu/dist/bin/libxcb-sync.so.1
Sandbox: Failed errno -2 op 1 flags 00 path /etc/ld.so.nohwcap
Sandbox: Failed errno -2 op 0 flags 02000000 path /home/jld/src/obj.gecko-dev/obj-x86_64-pc-linux-gnu/dist/bin/libxshmfence.so.1
Sandbox: Failed errno -2 op 1 flags 00 path /etc/ld.so.nohwcap
diff --git a/browser/components/about/AboutRedirector.cpp b/browser/components/about/AboutRedirector.cpp
--- a/browser/components/about/AboutRedirector.cpp
+++ b/browser/components/about/AboutRedirector.cpp
@@ -153,7 +153,7 @@ AboutRedirector::NewChannel(nsIURI* aURI
if (!strcmp(path.get(), redir.id)) {
nsAutoCString url;
- if (path.EqualsLiteral("newtab")) {
+ if (false && path.EqualsLiteral("newtab")) {
// let the aboutNewTabService decide where to redirect
SELECT shiny,
count(1) AS hits
FROM
(SELECT (CASE WHEN (kernel LIKE '%-generic%'
OR kernel LIKE '%-lowlatency%'
OR kernel LIKE '%.fc%')
AND NOT kernel LIKE '3.2.%' THEN 'Yay' ELSE 'Nope' END) AS shiny
FROM
(SELECT submission_date[1] as date, system_os[1].version AS kernel
FROM telemetry.longitudinal
@jld
jld / CubeSums.hs
Last active January 27, 2017 19:29
module CubeSums where
-- Note: Runtime on 64-bit can be reduced by 25-35% by using Int.
-- 64-bit Int would need ~70 hours of number-crunching to overflow,
-- but 32-bit Int can overflow in less than a second.
cube :: Integer -> Integer
cube x = x * x * x
cubeSums = [[cube x + cube y | y <- [0..x]] | x <- [0..]]
xmerge (a:as) bs = a:(merge as bs)
(add-hook 'markdown-mode-hook
(lambda ()
(remove-hook 'fill-nobreak-predicate 'markdown-nobreak-p)
(remove-hook 'fill-nobreak-predicate 'markdown-inside-link-p)
(add-hook 'fill-nobreak-predicate 'markdown-line-is-reference-definition-p)))
(eval-after-load "markdown-mode"
'(unless (fboundp 'markdown-line-is-reference-definition-p)
(defun markdown-line-is-reference-definition-p ()
(thing-at-point-looking-at
@jld
jld / gist:5f7562ff86a1c1d74c8b3a4604214824
Created June 10, 2016 20:54
KLEE vs. the NSPR date parser, round 1
""
"D"
"Dec"
"D "
"-"
" "
"De"
"DeC"
" "
"Pdt"
extern __attribute__((weak)) int gBaz;
class Foo {
__attribute__((weak)) static int sBar;
public:
int thing(void);
};
int Foo::thing(void) { return sBar + gBaz; }