Skip to content

Instantly share code, notes, and snippets.

@TheSeamau5
TheSeamau5 / RedditHomePage.elm
Last active March 10, 2016 15:14
Getting the Reddit Home Page using Elm Promises
--------------------------
-- CORE LIBRARY IMPORTS --
--------------------------
import Task exposing (Task, succeed, andThen, onError)
import Json.Decode exposing (Decoder, object2, (:=), string, int, list, map)
import Signal exposing (Signal, Mailbox, mailbox, send)
import List
---------------------------------
-- THIRD PARTY LIBRARY IMPORTS --
@3coma3
3coma3 / zoomsplit.vim
Last active March 26, 2020 21:25
add a map to vim to toogle zooming a split to max width/height - moving out to a same-tab split or closing the zoomed split also restores the window layout
function! ToggleZoom(toggle)
if exists("t:restore_zoom") && (t:restore_zoom.win != winnr() || a:toggle == v:true)
exec t:restore_zoom.cmd
unlet t:restore_zoom
elseif a:toggle
let t:restore_zoom = { 'win': winnr(), 'cmd': winrestcmd() }
vert resize | resize
endif
endfunction
augroup restorezoom