Skip to content

Instantly share code, notes, and snippets.

@ozanmakes
ozanmakes / keymap.json
Created June 17, 2023 19:29
Emacs keybindings for Zed (work in progress)
[
{
"bindings": {
"ctrl-g": "menu::Cancel",
"ctrl-x o": "workspace::ActivateNextPane",
"ctrl-tab": "pane::ActivateNextItem",
"ctrl-shift-tab": "pane::ActivatePrevItem"
}
},
{
@ozanmakes
ozanmakes / dune
Created January 23, 2019 08:46
Dune+Reason+bisect_ppx bug repro
(library
(name dune_reason_bisect)
(inline_tests)
(preprocess (pps ppx_expect bisect_ppx)))
@ozanmakes
ozanmakes / bsconfig.json
Created January 5, 2019 11:55
Repromise bundle size test
{
"name": "repromise_bundle_size_test",
"version": "0.1.0",
"sources": {
"dir" : ".",
},
"package-specs": {
"module": "es6-global",
"in-source": true
},
module Encode = struct
include Json.Encode
type 'a t = 'a -> Js.Json.t
type field = string * Js.Json.t
let unit () = null
let make f = f

Keybase proof

I hereby claim:

  • I am osener on github.
  • I am osener (https://keybase.io/osener) on keybase.
  • I have a public key ASB8JfwlBJ5CV1QALgFPJfobj1UxIOmE4_ZZmEb7lxIGyAo

To claim this, I am signing this object:

{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE TemplateHaskell #-}
module Widgets.Setting where
import Control.Applicative
import Control.Monad
import Control.Monad.IO.Class
import Data.Default
@ozanmakes
ozanmakes / API.hs
Created January 19, 2015 18:34
Thrust Haste example
module API where
import Haste.App
-- | Data type to hold all our API calls
data API =
API {setTitle :: Remote (String -> Server ())}
@ozanmakes
ozanmakes / Main.hs
Created January 19, 2015 18:25
Thrust menu example
{-# LANGUAGE OverloadedStrings #-}
import Control.Monad.IO.Class (liftIO)
import Graphics.UI.Thrust
import Graphics.UI.Thrust.SimpleMenu
import qualified Graphics.UI.Thrust.Window as W
setup :: Window -> UI ()
setup w =
do W.create
@ozanmakes
ozanmakes / gist:1c9ab2ee8d260ac534c3
Created December 2, 2014 17:05
"nix-env -i gnutar" output
➤ pwd
/Users/ozan/vcs/nixpkgs
➤ git config --get remote.origin.url
https://github.com/joelteon/nixpkgs
➤ echo $NIX_PATH
nixpkgs=/Users/ozan/vcs/nixpkgs
➤ nix-env -i gnutar
@ozanmakes
ozanmakes / gist:f0dcea018fb72ebed3e0
Created November 19, 2014 15:01
http-conduit downloader
{-# LANGUAGE OverloadedStrings #-}
module Downloader where
import Control.Monad.IO.Class (liftIO)
import Control.Monad.Trans.Resource
import qualified Data.ByteString as BS
import qualified Data.ByteString.Char8 as C8
import Data.Conduit
import qualified Data.Conduit.Binary as CB