Skip to content

Instantly share code, notes, and snippets.

View be-neth's full-sized avatar

Benoît Mauduit be-neth

  • 0xC48E3A1016E3D5BB | 0xEDA9502FC6FD68F6 | 0x14BF818B6EF4CE58 | 0xA11EBFBC76A7D4C9
  • Middle-Earth
View GitHub Profile
@barrysteyn
barrysteyn / Base64.md
Last active September 24, 2024 04:37
OpenSSL Base64 En/Decode: Portable and binary safe.

OpenSSL Base64 Encoding: Binary Safe and Portable

Herewith is an example of encoding to and from base64 using OpenSSL's C library. Code presented here is both binary safe, and portable (i.e. it should work on any Posix compliant system e.g. FreeBSD and Linux).

License

The MIT License (MIT)

Copyright (c) 2013 Barry Steyn

@yorickvP
yorickvP / wl-clipboard.el
Created March 14, 2019 11:02
teach emacs to use wl-copy
(setq wl-copy-process nil)
(defun wl-copy (text)
(setq wl-copy-process (make-process :name "wl-copy"
:buffer nil
:command '("wl-copy" "-f" "-n")
:connection-type 'pipe))
(process-send-string wl-copy-process text)
(process-send-eof wl-copy-process))
(defun wl-paste ()
(if (and wl-copy-process (process-live-p wl-copy-process))