Skip to content

Instantly share code, notes, and snippets.

@felixr
felixr / rm_lines.ksy
Created November 27, 2020 18:20
reMarkable lines format (v3 and v5)
meta:
id: remarkable_lines
file-extension: rm
endian: le
seq:
- id: header
type: header
- id: page
type: page
enums:
@gordonbrander
gordonbrander / README.md
Last active April 25, 2023 20:38
microview - data-driven views that render once per frame, at most

Microview

What if... Virtual DOM... but by hand?
aha ha, just kidding...
unless.. ?

Microview is a tiny library for writing efficient data-driven DOM rendering logic by hand. DOM writes are driven by a pure data model. Using Microview, you can freely "bash the dom". Writes will be batched — they'll only happen once per animationframe, and only if the data model changes.

@RabaDabaDoba
RabaDabaDoba / ANSI-color-codes.h
Last active July 1, 2024 06:54 — forked from iamnewton/bash-colors.md
The entire table of ANSI color codes working in C!
/*
* This is free and unencumbered software released into the public domain.
*
* For more information, please refer to <https://unlicense.org>
*/
//Regular text
#define BLK "\e[0;30m"
#define RED "\e[0;31m"
#define GRN "\e[0;32m"
@Anmo
Anmo / example.sh
Last active May 30, 2024 13:04
Use of submodules and sparse-checkout
#!/bin/bash
#First create a repo
mkdir A && cd A && git init && touch a.dev && touch a.prod && git add -A && git commit -m 'init A' && cd ../
#Lets create another repo that will use A as submodule with sparse-checkout
mkdir B && cd B && git init && touch b && git add -A && git commit -m 'init B'
#Now we will clone A as submodule of B and will say that file/dir we only want to use in B
git submodule add ../A/ A && cd A && git config core.sparsecheckout true && echo a.prod >> ../.git/modules/A/info/sparse-checkout && git read-tree -mu HEAD && cd ../ && git add -A && git commit -m 'add A as submodule/sparse-checkout' && cd ../
@ragingwind
ragingwind / Backend Architectures Keywords and References.md
Last active April 17, 2024 10:51
Backend Architectures Keywords and References
@agrueneberg
agrueneberg / webfinger.nginx
Last active April 30, 2023 22:00
A simple WebFinger resource for nginx (compatible with draft-ietf-appsawg-webfinger-14.txt).
location ~ /.well-known/webfinger {
add_header 'Access-Control-Allow-Origin' '*';
if ($arg_resource = "") {
return 400;
}
try_files /profiles/$arg_resource.json =404;
}
@cobyism
cobyism / gh-pages-deploy.md
Last active July 2, 2024 13:11
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

@tantaman
tantaman / example_usage.markdown
Created May 22, 2012 20:27 — forked from lwe/example_usage.markdown
iPhoto-like preview batches (Video in action: http://www.vimeo.com/6639381)

in action: http://www.vimeo.com/6639381

javascript:

var pp = "/images/test/images_";
var images_p1 = [ pp + '1.jpg', pp + '2.jpg', pp + '3.jpg', pp + '4.jpg', pp + '5.jpg' ];
var images_p2 = [ pp + '6.jpg', pp + '7.jpg', pp + '8.jpg', pp + '9.jpg', pp + '10.jpg' ];

$('.preview').slideview(function(e) { return e.id == "p1" ? images_p1 : images_p2; }, { size: 75 });
<!doctype html>
<html>
<head>
<title>Three.js : WebGL Canvas Texture Text Example</title>
<style type="text/css">
* {
margin: 0;
padding: 0;
}
body {
@milessabin
milessabin / gist:2659013
Created May 11, 2012 11:08
Proving equality of type constructors in Scala via an "arbitrary object" encoding of universal quantification.
// Universal quantification is encoded in terms of quantifier-free
// assertions about an "abitrary" type (cp. "all swans are white" vs.
// "the arbitrary swan is white". Inspired by Kit Fine's 1985 "Reasoning
// with Arbitrary Objects", http://philosophy.fas.nyu.edu/object/kitfine.
//
// Possibly also related to Oleg Kiselyov's "Interpreting types as
// abstract values", http://okmij.org/ftp/Computation/index.html#teval.
// What I wouldn't give for kind-polymorphism here ...