Skip to content

Instantly share code, notes, and snippets.

Avatar

Pierre Chapuis catwell

View GitHub Profile
View mercury-new.sh
wget https://raw.githubusercontent.com/oploadk/localua/master/localua.sh
sh localua.sh lua 5.1.5
./lua/bin/luarocks install https://raw.githubusercontent.com/catwell/mercury/master/rockspecs/mercury-scm-0.rockspec
wget https://raw.githubusercontent.com/catwell/mercury/master/samples/greetings.lua
./lua/bin/mercury greetings
@catwell
catwell / try-userland.sh
Created Oct 22, 2019
Use Hisham's userland on Arch Linux
View try-userland.sh
pacman -S love
git clone git@github.com:hishamhm/userland.git
cd userland
wget https://raw.githubusercontent.com/oploadk/localua/master/localua.sh
sh localua.sh localua 5.1.5
ln -s ./localua/bin/luarocks .
./luarocks install inspect
./luarocks install userland-dev-1.rockspec
./userland
View keybase.md

Keybase proof

I hereby claim:

  • I am catwell on github.
  • I am catwell (https://keybase.io/catwell) on keybase.
  • I have a public key ASAAdSIRAsiSsw-jaAXD49EPC6xYhc8Kncp1eFI7uUqB2Qo

To claim this, I am signing this object:

@catwell
catwell / typeguard-discriminated-union.ts
Created Aug 28, 2019
TypeScript - Type Guard for Discriminated Unions with Extract
View typeguard-discriminated-union.ts
export interface Chunky {
kind: 'chunky';
/* ... */
}
export interface Bacon {
kind: 'bacon';
/* ... */
}
@catwell
catwell / generic-typeguard-option-1.ts
Last active Aug 28, 2019
TypeScript Generic Type Guards
View generic-typeguard-option-1.ts
interface _typeMap {
chunky: Chunky;
bacon: Bacon;
}
type _stuffKind = keyof _typeMap;
export interface Stuff {
kind: _stuffKind;
/* ... */
@catwell
catwell / tsx.sublime-keymap
Created Aug 12, 2019
Enable Emmet and tag auto-close in Sublime Text
View tsx.sublime-keymap
[
{
"keys": ["tab"],
"command": "expand_abbreviation_by_tab",
// put comma-separated syntax selectors for which
// you want to expandEmmet abbreviations into "operand" key
// instead of SCOPE_SELECTOR.
// Examples: source.js, text.html - source
"context": [
@catwell
catwell / index.html
Created Aug 8, 2019
Elix component example
View index.html
<!DOCTYPE html>
<head>
<script type="module" src="https://component.kitchen/modules/FilterComboBox.js"></script>
</head>
<body>
<elix-filter-combo-box>
View slite-custom-css-fix-tables.css
/* Fix tables display in note view */
.note-view-centered-content {
max-width: none;
}
@catwell
catwell / light-dom.css
Created Jul 14, 2019
avoid-flash-of-unstyled-slot-stencil
View light-dom.css
my-component {
display: none;
}
my-component[is-loaded] {
display: block;
}
View lmp-encode.diff
diff --git a/multipart-post.lua b/multipart-post.lua
index 85b8096..86d44db 100644
--- a/multipart-post.lua
+++ b/multipart-post.lua
@@ -40,7 +40,7 @@ local gen_boundary = function()
return table.concat(t)
end
-local encode = function(r, k, v, boundary)
+local encode_header = function(r, k, v, boundary)
You can’t perform that action at this time.