Skip to content

Instantly share code, notes, and snippets.

😱
Oh well

Irakli Gozalishvili Gozala

Block or report user

Report or block Gozala

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View protocol-patch.diff
diff --git a/toolkit/components/extensions/ExtensionProtocol.jsm b/toolkit/components/extensions/ExtensionProtocol.jsm
new file mode 100644
index 000000000000..723bc3c77f6c
--- /dev/null
+++ b/toolkit/components/extensions/ExtensionProtocol.jsm
@@ -0,0 +1,964 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+"use strict"
View postcss.js.flow
// @flow strict
type SourceMapConsumer = {}
type Mapping = {}
type RawSourceMap = {}
type SourceMapGenerator = {}
type AcceptedPlugin = Plugin<any> | Transformer | {
postcss: TransformCallback | Processor;
} | Processor;
@Gozala
Gozala / freeze-dry.js
Created Apr 11, 2019
Lazy freeze-dry
View freeze-dry.js
// @flow strict
import { extractLinksFromDom, extractLinksFromCss } from './extract-links/index.js'
import { documentOuterHTML, pathForDomNode, domNodeAtPath, postcss } from './package.js'
import { Interface } from 'readline';
import { makeLinksAbsolute } from './dry-resources.js';
import makeDomStatic from './make-dom-static/index.js';
import setMementoTags from './set-memento-tags.js'
import setContentSecurityPolicy from './set-content-security-policy/index.js'
View codec.js
interface Format<a> {
format:Format;
defaultHashAlgorithm: string;
encode(a):Promise<Bytes<a>>;
decode(Bytes<a>):Promise<a>;
}
opaque type Bytes<a>:Uint8Array = Uint8Array
type BlockData<a> = Concat<Format, Bytes<a>>
opaque type Concat<a:Uint8Array, b:Uint8Array>:Uint8Array = Uint8Array
@Gozala
Gozala / buld
Created Jan 16, 2019
Build error
View buld
0:06.40 js/src/rust/force-cargo-library-build
0:06.40 toolkit/library/rust/force-cargo-library-build
0:06.40 js/src/frontend/binsource/force-cargo-host-program-build
0:06.49 toolkit/crashreporter/rust/force-cargo-host-library-build
0:07.90 Blocking waiting for file lock on build directory
0:07.90 Blocking waiting for file lock on build directory
0:08.10 Finished release [optimized] target(s) in 1.56s
0:08.19 testing/geckodriver/force-cargo-program-build
0:08.22 Finished release [optimized] target(s) in 1.73s
0:08.32 mfbt
View Verifying my Peepeth
Check out this DApp I'm using on Status: https://get.status.im/browse/peepeth.com
View lunet.log
This file has been truncated, but you can view the full file.
2018-12-14 18:12:18.701654 UTC - [Parent 7175: Main Thread]: D/nsHttp nsHttpHandler::NewProxiedChannel [proxyInfo=0x0]
2018-12-14 18:12:18.701764 UTC - [Parent 7175: Main Thread]: V/nsHttp Creating HttpBaseChannel @0x12fdb0000
2018-12-14 18:12:18.701787 UTC - [Parent 7175: Main Thread]: D/nsHttp Creating nsHttpChannel [this=0x12fdb0000]
2018-12-14 18:12:18.701809 UTC - [Parent 7175: Main Thread]: E/nsHttp HttpBaseChannel::Init [this=0x12fdb0000]
2018-12-14 18:12:18.701824 UTC - [Parent 7175: Main Thread]: E/nsHttp host=lunet.link port=-1
2018-12-14 18:12:18.701837 UTC - [Parent 7175: Main Thread]: E/nsHttp uri=https://lunet.link/planet
2018-12-14 18:12:18.701855 UTC - [Parent 7175: Main Thread]: E/nsHttp nsHttpChannel::Init [this=0x12fdb0000]
2018-12-14 18:12:18.707281 UTC - [Parent 7175: Main Thread]: D/nsHttp nsHttpHandler::Observe [topic="net:current-toplevel-outer-content-windowid"]
2018-12-14 18:12:18.707526 UTC - [Parent 7175: Main Thread]: D/nsSocketTransport STS dispatch [0x13093bc40]
View blockstack.proof
Verifying my Blockstack ID is secured with the address 1BYXhnj3VhU8ndrdsbn329Y2TEHxEMn3gt https://explorer.blockstack.org/address/1BYXhnj3VhU8ndrdsbn329Y2TEHxEMn3gt
@Gozala
Gozala / popup.js
Created Oct 12, 2018
narrate hack
View popup.js
var extension = {id:"7cc71529-5b04-d84b-8473-aca5e6791051"}
var panel = document.createXULElement("panel")
panel.classList.add("popup-notification-panel");
panel.setAttribute("followanchor", true)
panel.setAttribute("type", "arrow")
popupnotification = document.createXULElement("popupnotification")
popupnotification.setAttribute("label", "");
popupnotification.setAttribute("name", "label name");
@Gozala
Gozala / task.js
Created Oct 10, 2018
Flow generator hackery to make it make it infer types
View task.js
/* @flow strict */
type Future<x, a> = () => Task<x, a>
type Task<x, a> = {
@@iterator(): $Iterator<empty, a, empty>;
next(empty): IteratorResult<empty, a>;
return(a): IteratorResult<empty, a>;
throw(x): IteratorResult<empty, a>;
You can’t perform that action at this time.