Skip to content

Instantly share code, notes, and snippets.

@mdsib
mdsib / thing.clj
Created April 26, 2018 01:21
URN (not clojure) drawing all love2d shapes associated with physics body
(defun draw-shapes (body)
;; get all fixture shapes as world points and the shape type
;; check type, draw according to things
(do [(shape (map (lambda (fixture) (self fixture :getShape)) (values (self body :getFixtures))))]
(love/graphics/set-color 1 0 0 0.1)
(case (self shape :getType)
["polygon" (love/graphics/polygon
"fill"
(self body :getWorldPoints (self shape :getPoints)))]
["circle" (love/graphics/circle
@mdsib
mdsib / out
Created March 7, 2018 07:36
output of znc --makepem --datadir ~ on nixos
znc --makepem --datadir ~
Writing Pem file [/home/mds/znc.pem]...
*** Error in `znc': double free or corruption (!prev): 0x0000000000a7a360 ***
======= Backtrace: =========
/nix/store/d54amiggq6bw23jw6mdsgamvs6v1g3bh-glibc-2.25-123/lib/libc.so.6(+0x71466)[0x7ffa8fb21466]
/nix/store/d54amiggq6bw23jw6mdsgamvs6v1g3bh-glibc-2.25-123/lib/libc.so.6(+0x77846)[0x7ffa8fb27846]
/nix/store/d54amiggq6bw23jw6mdsgamvs6v1g3bh-glibc-2.25-123/lib/libc.so.6(+0x7804e)[0x7ffa8fb2804e]
/nix/store/1j85y9zswjnya4lxsw68agdn6nxg907r-openssl-1.0.2n/lib/libcrypto.so.1.0.0(CRYPTO_free+0x1d)[0x7ffa9097dedd]
/nix/store/1j85y9zswjnya4lxsw68agdn6nxg907r-openssl-1.0.2n/lib/libcrypto.so.1.0.0(+0x134594)[0x7ffa90a49594]
@mdsib
mdsib / custom-font-upload-frontend.html
Last active September 21, 2017 22:29
uploading a font to be used
<html>
<head>
<title>Uploading custom fonts</title>
</head>
<body>
<form id="custom-font-input">
<label> pick a font: <input type="file"></label>
<input type="submit">
</form>
<p style="font-family:custom" contenteditable>edit me</p>
@mdsib
mdsib / insert-newest-link.el
Last active April 12, 2017 00:43
Creates a keybinding that links to the most recently edited file of a directory.
;; Added by Package.el. This must come before configurations of
;; installed packages. Don't delete this line. If you don't want it,
;; just comment it out by adding a semicolon to the start of the line.
;; You may delete these explanatory comments.
(package-initialize)
(setq evil-want-C-u-scroll t)
(custom-set-variables
(setq package-archives '(("gnu" . "https://elpa.gnu.org/packages/")
("marmalade" . "https://marmalade-repo.org/packages/")
("melpa" . "https://melpa.org/packages/")))
;; Activating stuff
(which-key-mode 1)
(ivy-mode 1)
(electric-pair-mode 1)
(evil-mode 1)
(company-mode 1)
@mdsib
mdsib / keybase.md
Created July 12, 2016 17:40
Proof.

Keybase proof

I hereby claim:

  • I am mdsib on github.
  • I am massi (https://keybase.io/massi) on keybase.
  • I have a public key whose fingerprint is C1C9 5914 93C0 77C4 8E87 E2E5 5128 246F 3D4B 6EBB

To claim this, I am signing this object: