Skip to content

Instantly share code, notes, and snippets.

@peterbartha
peterbartha / README.md
Last active November 7, 2024 14:04
Convert Rust books to EPUB (incl. The Rust Programming Language)

Convert Rust books to EPUB (incl. The Rust Programming Language)

The following steps work for all the HTML learning materials on the Learn Rust page:

  1. Click on the "Print this book" icon in the top right corner.
  2. "Cancel" print popup.
  3. Press F12.
  4. Copy, paste, and run the contents of ebookFormatPreparation.js into your browser's console.
  5. Save the modified HTML file.
@graninas
graninas / haskeller_competency_matrix.md
Last active October 5, 2024 13:40
Haskeller competency matrix
/* MySQL raytracing engine by Nick ([email protected]) */
Select if(repeat(char(
/* Parameters */
@w := 100, /* width of the output in pixels */
@h := 100, /* height of the output in pixels */
@cam.x := 0.0, /* x-position of the camera */
@cam.y := 0.0, /* y-position of the camera */
@cam.z := -6, /* z-position of the camera */
@cam.lookatx := 0.0, /* x-position of a point at which the camera looks at */
@cam.lookaty := 0.0, /* y-position of a point at which the camera looks at */
@swannodette
swannodette / inference.md
Last active August 7, 2023 16:13
Externs Inference

Externs Inference

Integrating third party JavaScript libraries not written with Google Closure Compiler in mind continues to both be a source of error for users when going to production, and significant vigilance and effort for the the broader community (CLJSJS libraries must provide up-to-date and accurate externs).

In truth writing externs is far simpler than most users imagine. You only need externs for the parts of the library you actually intend to use from ClojureScript. However this isn't so easy to determine from Closure's own documentation. Still in the process of writing your code it's easy to miss a case. In production you will see the much dreaded error that some mangled name does not exist. Fortunately it's possible to enable some compiler flags :pretty-print true :pseudo-names true to generate an advanced build with human readable names. However debugging missing externs means compiling your production build for each missed case. So much time wasted for such simple mistakes damages our sen

@bishboria
bishboria / springer-free-maths-books.md
Last active October 3, 2024 09:17
Springer made a bunch of books available for free, these were the direct links
@ygotthilf
ygotthilf / jwtRS256.sh
Last active November 7, 2024 10:42
How to generate JWT RS256 key
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key
# Don't add passphrase
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub
cat jwtRS256.key
cat jwtRS256.key.pub
(defn my-get
"@param {*} m
@param {*} k
@return {nil|Object}"
[m k]
(get m k))
(defn foo
"@param {!Object} x" ;; non-nullable
[x] x)
@rehno-lindeque
rehno-lindeque / NixSetup.md
Last active September 13, 2024 01:22
NixOS Setup (Virtualized + Haskell + Gnome3 + XMonad)

Setup NixOS (Virtualized + Haskell + Gnome3 + XMonad)

Before you get started

This is pretty out of date now... you may want to look elsewhere

Newer guides than mine (mine is a bit dated and has a lot of rough edges):

Have you looked at these?

<!DOCTYPE html>
<html>
<body>
<section>
<video> controls autoplay width="1920"></video>
</section>
<script type="text/javascript">
var buffer;
@nokimaro
nokimaro / weather.md
Last active December 24, 2023 03:47
API для погоды