Skip to content

Instantly share code, notes, and snippets.

View mmontone's full-sized avatar

Mariano Montone mmontone

View GitHub Profile
@mmontone
mmontone / webrtc-jscl.lisp
Last active September 22, 2022 14:04
WebRTC with JSCL
;; WebSocket and WebRTC based multi-user chat sample with two-way video
;; calling, including use of TURN if applicable or necessary.
;; This file contains the JavaScript code that implements the client-side
;; features for connecting and managing chat and video calls.
;; To read about how this sample works: http://bit.ly/webrtc-from-chat
;; Any copyright is dedicated to the Public Domain.
;; http://creativecommons.org/publicdomain/zero/1.0/
@mmontone
mmontone / cider-utils.el
Last active September 14, 2022 21:24
Emacs utils
(require 'cider)
(require 's)
;; Browse namespace from info -*- lexical-binding: t -*-
(defun cider-docview-render-info (buffer info)
"Emit into BUFFER formatted INFO for the Clojure or Java symbol."
(let* ((ns (nrepl-dict-get info "ns"))
(name (nrepl-dict-get info "name"))
(added (nrepl-dict-get info "added"))
(depr (nrepl-dict-get info "deprecated"))
@mmontone
mmontone / auto-gensym.lisp
Last active October 5, 2022 13:19
Clojure style automatic symbol generation for Common Lisp
;; Copyright (c) 2022 Mariano Montone
;; Permission is hereby granted, free of charge, to any person obtaining a copy
;; of this software and associated documentation files (the "Software"), to deal
;; in the Software without restriction, including without limitation the rights
;; to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
;; copies of the Software, and to permit persons to whom the Software is
;; furnished to do so, subject to the following conditions:
;; The above copyright notice and this permission notice shall be included in all
@mmontone
mmontone / estimated-time-progress.lisp
Last active March 1, 2023 19:21
Displays progress with time estimation (useful for long tasks)
(defpackage estimated-time-progress
(:local-nicknames
(:pb :cl-progress-bar.progress))
(:use :cl)
(:export :with-estimated-time-progress))
(in-package :estimated-time-progress)
(defconstant +seconds-in-one-hour+ 3600)
(defconstant +seconds-in-one-minute+ 60)