Skip to content

Instantly share code, notes, and snippets.

// https://mindwi.se/?WikiMind
<?php
$N='wiki'; //WikiMind 2022.04
$P='$2y$12$c5Zq/0ggJcT.tbUpr3igaefZG0xy1WLkzTc/yx5YwrA4A1.ZF2UuO';
function p($r){return preg_match('/^<\/?(ul|ol|li|h|p|bl)/',trim($r[1]))?"\n".$r[1]."\n": sprintf("\n<p>%s</p>\n",trim($r[1]));}
function u($r){return sprintf("\n<ul>\n\t<li>%s</li>\n</ul>",trim($r[1]));}
function o($r){return sprintf("\n<ol>\n\t<li>%s</li>\n</ol>",trim($r[1]));}
function q($r){return sprintf("\n<blockquote>%s</blockquote>",trim($r[2]));}
function v($r){return sprintf("\n<div id=v>%s</div>",trim($r[2]));}
function h($r){list($z,$c,$h)=$r;return sprintf('<a name="%s"></a><h%d>%s</h%d>',trim($h),strlen($c),trim($h),strlen($c));}
@cadars
cadars / labyrinthe-educatif.md
Last active October 14, 2022 08:17
Guy Debord, Projet pour un labyrinthe éducatif, 1956

PROJET POUR UN LABYRINTHE ÉDUCATIF

Le labyrinthe pourra être constitué, au minimum, par plusieurs séries de couloirs, de forme identique, disposés assez habilement pour y rendre l'orientation réellement impossible.

L'organisation du labyrinthe éducatif tendra au dépaysement violent des visiteurs :

a) Par la décoration des lieux. Objets et tableaux. Slogans écrits sur les murs. Contrastes d'éclairage.

Sur les murs du labyrinthe des numéros inutiles, imitant ceux des rues des villes. De fausses fenêtres, s'ouvrant sur des agrandissements photographiques de divers paysages urbains, ou de tout autre sujet.

@cadars
cadars / nice-wikipedia.css
Last active May 20, 2022 14:34
Nice Wikipedia
/*
WARNING: “THAT WILL DO” STYLE OVERRIDES.
HOW TO USE: INSTALL THE STYLUS EXTENSION (CHROMIUM/FIREFOX) AND CREATE A NEW STYLE FOR THE WIKIPEDIA.ORG DOMAIN.
TIP: INSTALL SOURCE SERIF 4 (NOT VARIABLE) ON YOUR DEVICE: https://github.com/adobe-fonts/source-serif/releases
TO-DO: LINK COLORS FOR TOP RIGHT MENU
*/
--sans:
-apple-system,
BlinkMacSystemFont,
'Segoe UI',
'Noto Sans',
Roboto,
Oxygen-Sans,
Ubuntu,
'Helvetica Neue',
Helvetica,
javascript:(function(){var id='add-alt-text-overlay';var s=document.getElementById(id); if(s){s.parentNode.removeChild(s)}else{s=document.createElement('style');s.id=id;s.innerHTML='div[data-testid="tweetPhoto"]:not([aria-label="Image"]),div[data-testid="previewInterstitial"]:not([aria-label="Embedded video"]){margin:0!important;}div[aria-label="Play this GIF"]{position:absolute;}div[data-testid="tweetPhoto"]:hover:not([aria-label="Image"]):after,div[data-testid="previewInterstitial"]:hover:not([aria-label="Embedded video"]):after{content:attr(aria-label);background:#000000dd;color:#fff;padding:.6em .9em;font-family:system-ui,sans-serif;line-height:130%;z-index:1;overflow:auto;}';document.head.appendChild(s);}})();
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cadars
cadars / kbd.js
Last active October 12, 2022 14:14
import { Mark, markInputRule, markPasteRule } from '@tiptap/core';
export const kbdInputRegex = /(?:^|\s)((?:<kbd>)((?:[^*]+))(?:<\/kbd>))$/;
export const kbdPasteRegex = /(?:^|\s)((?:<kbd>)((?:[^*]+))(?:<\/kbd>))/g;
export const Kbd = Mark.create({
name: 'kbd',
excludes: '_',
@cadars
cadars / .htaccess
Last active July 22, 2021 11:59
Force HTTP (note that it needs a valid https certificate to work ¯\_(ツ)_/¯)
RewriteEngine On
RewriteCond %{HTTPS} !=off
RewriteRule ^(.*)$ http://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE]
@cadars
cadars / portable-feed.php
Last active October 22, 2023 13:45
RSS feed for portable-php
<?php
/* Generate a basic RSS feed (post titles only) for https://github.com/cadars/portable.php
- Add <link rel="alternate" type="application/rss+xml" href="feed.xml"> to the <head> of portable.php
- `bash portable.sh` to generate both index.html and feed.xml */
$site_title = 'This is the website title';
$site_desc = 'This is the website description';
$site_url = 'http://example.com';