Skip to content

Instantly share code, notes, and snippets.

Place your cursor on the line 6 and type 0"qy$@q to execute brainfuck code in line 9.
Memory begins from line 22, you can add zeroes here to increase available amount.
Line 21 is output. There is no input. Negative numbers are not supported.
Plugins / remaps can break the interpreter. Run this with -u NONE.
j0"sy$jjmcjmo/^catch jmz0"_d$jmd/catch kk$s0@s
`c"cyl'o/\M^c W"cy$'d@c`clmc@s
++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.
@sindresorhus
sindresorhus / esm-package.md
Last active September 18, 2024 22:09
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@andrebrait
andrebrait / keychron_linux.md
Last active September 17, 2024 19:49
Keychron keyboards on Linux + Bluetooth fixes

Here is the best setup (I think so :D) for K-series Keychron keyboards on Linux.

Note: many newer Keychron keyboards use QMK as firmware and most tips here do not apply to them. Maybe the ones related to Bluetooth can be useful, but everything related to Apple's keyboard module (hid_apple) on Linux, won't work. As far as I know, all QMK-based boards use the hid_generic module instead. Examples of QMK-based boards are: Q, Q-Pro, V, K-Pro, etc.

Most of these commands have been tested on Ubuntu 20.04 and should also work on most Debian-based distributions. If a command happens not to work for you, take a look in the comment section.

Make Fn + F-keys work (NOT FOR QMK-BASED BOARDS)

Older Keychron keyboards (those not based on QMK) use the hid_apple driver on Linux, even in the Windows/Android mode, both in Bluetooth and Wired modes.

@bjesus
bjesus / README.md
Last active September 19, 2024 22:17
Weather widget for waybar
@gosukiwi
gosukiwi / common-lisp-cheatsheet.md
Last active April 16, 2024 13:59
Common Lisp Cheatsheet

Common Lisp Cheatsheet

Common Lisp is a general-purpose programming language with functions as first-class citizens. Don't worry about being purely functional, Lisp is Object Oriented too. CLOS is a very powerful object-oriented system!

Useful definitions

The Common Lisp lingo is quite unique:

  • Package: Basically a namespace, a place for symbols to live
  • System: Basically a Library. A bunch of code plus some instructions how it should be treated, for example which other systems it depends on, what should be loaded and/or compiled first, etc. Not in ANSI lisp but widespread. The most common system definition tool is ASDF.
  • Modules: Deprecated and implementation-dependent
  • Quicklisp: Like NPM or Ruby Gems for ASDF Systems.
[package]
name = "snake_game"
version = "0.1.0"
authors = ["youcodethings <spyr1014@gmail.com>"]
[dependencies]
piston = "0.36.0"
piston2d-graphics = "0.26.0"
pistoncore-glutin_window = "0.45.0"
piston2d-opengl_graphics = "0.52.0"
@vmrob
vmrob / channel.cpp
Last active March 29, 2021 23:40
Go channels in C++
#include <future>
#include <iostream>
#include <thread>
#include <queue>
template <typename T>
class concurrent_queue {
private:
std::queue<T> _queue;
std::mutex _mutex;
@sixthgear
sixthgear / vect.h
Created December 21, 2011 22:14
Generic Vector Type in C
#ifndef VECT_H
#define VECT_H
/*
* vect.h -- type-safe generic dynamic array
* made by sixthgear. BSD Licenced.
*/
#include <stdio.h>
#include <stdlib.h>
@zard1989
zard1989 / insertion_sort.lisp
Created May 30, 2011 18:40
insertion sort in common lisp
(defun insert (item lst &optional (key #'<))
(if (null lst)
(list item)
(if (funcall key item (car lst))
(cons item lst)
(cons (car lst) (insert item (cdr lst) key)))))
(defun insertion-sort (lst &optional (key #'<))
(if (null lst)
lst
@sole
sole / xcursor theme tutorial
Created September 9, 2010 12:34
A lightly edited version of the xcursor theme tutorial by the_One at http://kde-look.org/content/show.php?content=11428
<---TUTORIAL FOR CREATING XCURSOR THEMES.--->
<---By ThEOnE @ kde-look--->
<---My_foros@yahoo.com.ar-->
_______________________________________________________________________________________
| |
| First of all, let me tell you that everything I know I've learned it by inspecting |
| some xcursor themes like jaguarx, and others. |