Skip to content

Instantly share code, notes, and snippets.

public void displayGame(String mode, Consumer<Integer> setColorDepth, BiConsumer<Screen, Integer> drawRect) {
if (mode.equals("small")) {
setColorDepth.accept(8);
drawRect.accept(screen, 1024, 768);
} else if (mode.equals("medium")) {
setColorDepth.accept(16);
drawRect.accept(screen, 1600, 1200);
}
}
{
"name": "Iris Rev. 6b",
"vendorProductId": 3406849110,
"macros": ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""],
"layers": [
[
"KC_ESC",
"KC_1",
"KC_2",
"KC_3",
{
"name": "Iris Rev. 6b",
"vendorProductId": 3406849110,
"macros": ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""],
"layers": [
[
"KC_ESC",
"KC_1",
"KC_2",
"KC_3",
@Exegetech
Exegetech / alacritty-tmux-vim_truecolor.md
Created July 27, 2022 04:18 — forked from andersevenrud/alacritty-tmux-vim_truecolor.md
True Color (24-bit) and italics with alacritty + tmux + vim (neovim)

True Color (24-bit) and italics with alacritty + tmux + vim (neovim)

This should make True Color (24-bit) and italics work in your tmux session and vim/neovim when using Alacritty (and should be compatible with any other terminal emulator, including Kitty).

Testing colors

Running this script should look the same in tmux as without.

curl -s https://gist.github.com/lifepillar/09a44b8cf0f9397465614e622979107f/raw/24-bit-color.sh >24-bit-color.sh
@Exegetech
Exegetech / grokking_to_leetcode.md
Created March 25, 2022 04:35 — forked from tykurtz/grokking_to_leetcode.md
Grokking the coding interview equivalent leetcode problems

GROKKING NOTES

I liked the way Grokking the coding interview organized problems into learnable patterns. However, the course is expensive and the majority of the time the problems are copy-pasted from leetcode. As the explanations on leetcode are usually just as good, the course really boils down to being a glorified curated list of leetcode problems.

So below I made a list of leetcode problems that are as close to grokking problems as possible.

Pattern: Sliding Window

@Exegetech
Exegetech / 256color.pl
Created May 2, 2020 16:21 — forked from hSATAC/256color.pl
256color.pl
#!/usr/bin/perl
# Author: Todd Larason <[email protected]>
# $XFree86: xc/programs/xterm/vttests/256colors2.pl,v 1.2 2002/03/26 01:46:43 dickey Exp $
# use the resources for colors 0-15 - usually more-or-less a
# reproduction of the standard ANSI colors, but possibly more
# pleasing shades
# colors 16-231 are a 6x6x6 color cube
for ($red = 0; $red < 6; $red++) {
@Exegetech
Exegetech / README.md
Created April 2, 2018 18:49
Sequelize + Express + Migrations + Seed Starter
@Exegetech
Exegetech / gist:d7361e06d2c965d88f74a41bc09c37be
Created March 10, 2018 07:42 — forked from dsibilly/gist:2992412
Node.js clustered HTTP server example
(function () {
'use strict';
var cluster = require('cluster'),
http = require('http'),
os = require('os'),
/*
* ClusterServer object
@Exegetech
Exegetech / channel.js
Created March 5, 2018 23:06 — forked from srikumarks/channel.js
CSP-style channel implementation for Javascript on top of ES6-style Promises.
"use strict";
// Channel is a simple object that can be used for
// CSP-style concurrency in Javascript. In JS code,
// the act of taking a value from a channel looks
// like a blocking call and therefore is not appropriate
// for single-process/single-thread environments like
// NodeJS. To address that, Channel produces promises
// for values.
//
@Exegetech
Exegetech / concat.hs
Created January 6, 2018 06:25 — forked from soupi/concat.hs
simple concatenative interpreter
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE LambdaCase #-}
import Control.Monad
import Data.Data
import Data.Typeable
import System.IO
import System.Exit
type Stack = [Lit]