Skip to content

Instantly share code, notes, and snippets.

Oh well

Irakli Gozalishvili Gozala

Oh well
View GitHub Profile
Gozala /
Created May 30, 2017 — forked from chrisdone/
Statically Typed Lisp

Basic unit type:

λ> replTy "()"
() :: ()

Basic functions:

Gozala / Focus.elm
Last active Aug 20, 2016 — forked from debois/Proposal.elm
Declarative focus management API
View Focus.elm
{-| Focus management is not a trivial task, but luckly most of it's logic can be fully self
contained by principrals of Elm archituture.
import Html exposing (Attribute, Html)
import Html.Attributes exposing (attribute)
import Html.Events
import Setting exposing (setting)
Gozala /
Created Apr 12, 2016 — forked from bcomnes/
my version of gpg on the mac
  1. brew install gnupg21, pinentry-mac (this includes gpg-agent and pinentry)
  2. Generate a key: $ gpg --gen-key
  3. Take the defaults. Whatevs
  4. Tell gpg-agent to use pinentry-mac:
$ vim ~/.gnupg/gpg-agent.conf 
View gist:5584873
// Button is a high level construct that can be used
// to define button types with a specific behaviors
let { Button } = require("sdk/ui");
// Button with specicic behavior can be defined by passing a function
// defining a behaivor of a button on the specific state changes.
var button = Button(function behavior(state, {owner}) {
// First argument represents current `state` snapshot for the button
// in the context of the given `options.owner` window.
Gozala /
Last active Dec 16, 2015 — forked from ZER0/gist:5209412
Direct page to add-on communication

Consider following example where:

A - addon

B -

  • C -

Related material

View tweets.js
// This is in response to
// Peeja wanted to know how to convert some callback-based code to functional
// style using promises.
var Promise = require('rsvp').Promise;
var ids = [1,2,3,4,5,6];
// If this were synchronous, we'd simply write:
View gist:4637925
var obj = {
_discoverScriptsAndSources: function TA__discoverScriptsAndSources() {
let scriptsAdded = [];
for (let s of this.dbg.findScripts()) {
if (!this._allowSource(s.url)) {
Gozala / iframe.js
Created Dec 11, 2012 — forked from anonymous/iframe.js
Updated version
View iframe.js
let { Cc, Ci } = require('chrome');
let appShellService = Cc[';1'].
let service = Cc[";1"].
let window = appShellService.hiddenDOMWindow;
let document = window.document;
let XUL = ''
Gozala / case.js
Created Nov 6, 2012 — forked from isaacs/case.js
npm testcase
View case.js
var npm = require("npm")
var path = require("path")
npm.load({ prefix: path.join(process.env.HOME, ".orchestrator") }, function(e, npm) {[], function(err, _) {
// this time it's nothing but probably results are cached
npm.commands.install(["method"], function(err, _) {
// now there is something but it still thinks there is nothing.[], console.log)
Gozala / derp-modules.js
Created Oct 11, 2012 — forked from gordonbrander/derp-modules.js
Simple, tiny, dumb JavaScript Modules
View derp-modules.js
(function(exports) {
// Simple, tiny, dumb module definitions for Browser JavaScript.
// What it does:
// * Tiny enough to include anywhere. Intended as a shim for delivering
// browser builds of your library to folks who don't want to use script loaders.
// * Exports modules to `__modules__`, a namespace on the global object.
// This is an improvement over typical browser code, which pollutes the
// global object.