Skip to content

Instantly share code, notes, and snippets.

View marcusramberg's full-sized avatar

Marcus Ramberg marcusramberg

View GitHub Profile
diff --git a/src/body.ts b/src/body.ts
index 7699b13..b2ab8bd 100644
--- a/src/body.ts
+++ b/src/body.ts
@@ -1,5 +1,6 @@
import type {JSONValue} from './types.js';
import type {Readable, Writable} from 'node:stream';
+import type {IncomingMessage} from 'node:http';
import {on} from 'node:events';
import zlib from 'node:zlib';
import mojo from '@mojojs/core';
const app = mojo();
app.post('/', async ctx => {
ctx.log.debug(await ctx.req.text());
await ctx.render({json: await ctx.req.json()});
});
app.start();
@marcusramberg
marcusramberg / surfingkeys.js
Last active June 9, 2023 11:46
My SurfingKeys config
// emoji at os-level.
api.iunmap(":");
api.cmap('<Ctrl-n>', '<Tab>');
api.cmap('<Ctrl-p>', '<Shift-Tab>');
api.unmap("/", /github.com/)
settings.modeAfterYank = "Normal";
settings.tabsThreshold = 0;
api.mapkey('<Space>', 'Choose a tab with omnibar', function() {
1.5) Official ASR mottos
The official ASR motto, our catch phrase, is the immortal:
"Down, not Across"
It is our mantra. We recite it to ourselves as we deal with the day-to-day
realities of a life that is far more nasty, brutish, and short than even
Hobbes could have ever imagined.
❯ ./node_modules/tap/bin/run.js
test/support/server.js 2> /home/marcus/Source/server-starter/test/support/server.js:1
test/support/server.js 2> Error: listen EINVAL: invalid argument
test/support/server.js 2> at Server.setupListenHandle [as _listen2] (node:net:1293:21)
test/support/server.js 2> at listenInCluster (node:net:1358:12)
test/support/server.js 2> at Server.listen (node:net:1419:5)
test/support/server.js 2> at Object.<anonymous> (/home/marcus/Source/server-starter/test/support/server.js:9:8)
test/support/server.js 2> at Generator.next (<anonymous>)
test/support/server.js 2> Emitted 'error' event on Server instance at:
test/support/server.js 2> at emitErrorNT (node:net:1337:8)
#!/usr/bin/env perl -w
use strict;
if (1) {
$var = 'a';
}
print $var
@marcusramberg
marcusramberg / surfingkeys.conf
Last active November 5, 2020 13:46
surfingkeys config
// -----------------------------------------------------------------------------------------------------------------------
// // Surfingkeys: https://github.com/brookhong/Surfingkeys#properties-list
// // Dracula Theme: https://github.com/dracula/dracula-theme#color-palette
// -----------------------------------------------------------------------------------------------------------------------
// Map Keys
// -----------------------------------------------------------------------------------------------------------------------
unmap('ox');
unmap('oh');
unmap('om');
unmap('on');
<code_scheme name="DNB ShaSL" version="173">
<JavaCodeStyleSettings>
<option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="99" />
<option name="NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND" value="10" />
</JavaCodeStyleSettings>
<codeStyleSettings language="JAVA">
<option name="KEEP_FIRST_COLUMN_COMMENT" value="false" />
<option name="ALIGN_MULTILINE_PARAMETERS" value="false" />
<option name="CALL_PARAMETERS_WRAP" value="1" />
<option name="METHOD_PARAMETERS_WRAP" value="1" />
{"cssVars":{"bg":"#2E3440","title_fg":"#ECEFF4","sub_title_fg":"#E5E9F0","label_fg":"#D8DEE9","label_fg_hover":"#88C0D0","label_fg_active":"#81A1C1","info_fg":"#B48EAD","true_fg":"#A3BE8C","false_fg":"#BF616A","active_fg":"#D08770","inactive_fg":"#D8DEE9","favicons_placeholder_bg":"#8FBCBB","btn_bg":"#434C5E","btn_bg_hover":"#D8DEE9","btn_bg_active":"#D8DEE9","btn_fg":"#88C0D0","btn_fg_hover":"#4C566A","btn_fg_active":null,"scroll_progress_h":"3px","scroll_progress_bg":"#88C0D0","ctx_menu_font":null,"ctx_menu_bg":null,"ctx_menu_bg_hover":null,"ctx_menu_fg":null,"nav_btn_fg":null,"nav_btn_width":null,"nav_btn_height":null,"pinned_dock_overlay_bg":null,"pinned_dock_overlay_shadow":null,"tabs_height":"25px","tabs_pinned_height":null,"tabs_pinned_width":null,"tabs_indent":null,"tabs_font":"0.8rem jetbrains mono","tabs_count_font":null,"tabs_fg":"#D8DEE9","tabs_fg_hover":null,"tabs_fg_active":null,"tabs_bg_hover":null,"tabs_bg_active":null,"tabs_activated_bg":null,"tabs_activated_fg":null,"tabs_selected_bg":null,"