Skip to content

Instantly share code, notes, and snippets.


Claudio Holanda Jr. kazzkiq

View GitHub Profile
aelobdog / helloworld.lua
Created August 5, 2021 12:47
my first plugin for lite-xl : displays the text "hello, world!" on the top right of the screen
View helloworld.lua
-- mod-version:1 -- lite-xl 1.16
-- NAME : helloworld
-- GOAL : to render some text to the top right corner of the editor.
-- import the lite-xl "core" package
local core = require "core"
local command = require "core.command"
local style = require ""
local config = require "core.config"
Checksum / websocket_proxy.js
Last active November 10, 2022 17:13
Intercepting WebSockets in the browser using JavaScript
View websocket_proxy.js
const WebSocketProxy = new Proxy(window.WebSocket, {
construct(target, args) {
console.log("Proxying WebSocket connection", ...args);
const ws = new target(...args);
// Configurable hooks
ws.hooks = {
beforeSend: () => null,
beforeReceive: () => null
leopoldodonnell /
Last active May 19, 2023 04:59
Install and run Postgres with an extension using docker-compose

Local Postgres

This gist is an example of how you can simply install and run and extended Postgres using docker-compose. It assumes that you have docker and docker-compose installed and running on your workstation.


  • Requires docker and docker-compose
  • Clone via http: git clone
  • Make executable
  • Build the image: docker-compose build
Rich-Harris /
Last active May 24, 2023 08:44
The truth about Svelte

I've been deceiving you all. I had you believe that Svelte was a UI framework — unlike React and Vue etc, because it shifts work out of the client and into the compiler, but a framework nonetheless.

But that's not exactly accurate. In my defense, I didn't realise it myself until very recently. But with Svelte 3 around the corner, it's time to come clean about what Svelte really is.

Svelte is a language.

Specifically, Svelte is an attempt to answer a question that many people have asked, and a few have answered: what would it look like if we had a language for describing reactive user interfaces?

A few projects that have answered this question:

SuryaElite /
Created September 23, 2018 09:49
Launch Sublime Merge from the command line on OSX

Launch Sublime Merge from the command line on OSX

Sublime Merge includes a command line tool, smerge, to work with git, subversion, mercurial projects on the command line. This can be used to open projects in Sublime Merge using the command line.


  • Sublime Merge installed in your system within Applications folder


joepie91 /
Last active March 22, 2023 10:06
You Don't Need A Blockchain

You don't need a blockchain.

If you're reading this, you probably suggested to somebody that a particular technical problem could be solved with a blockchain.

Blockchains aren't a desirable thing; they're defined by having trustless consensus, which necessarily has to involve some form of costly signaling to work; that's what prevents attacks like sybil attacks.

In other words: blockchains must be expensive to operate, to work effectively. This makes it a last-resort solution, when you truly have no other options available for solving your problem; in almost every case you want a cheaper and less complex solution than a blockchain.

In particular, if your usecase is commercial, then you do not need or want trustless consensus. This especially includes usecases like supply chain tracking, ticketing, and so on. The whole *p

bradwestfall /
Last active May 12, 2023 12:02
Use S3 and CloudFront to host Static Single Page Apps (SPAs) with HTTPs and www-redirects. Also covers deployments.

S3 Static Sites

This post is fairly old. I don't keep it up to date. Be sure to see comments where some people have posted updates

What this will cover

  • Host a static website at S3
  • Redirect to
  • Website can be an SPA (requiring all requests to return index.html)
  • Free AWS SSL certs
  • Deployment with CDN invalidation
crittermike /
Last active May 11, 2023 13:03
Download an entire website with wget, along with assets.
# One liner
wget --recursive --page-requisites --adjust-extension --span-hosts --convert-links --restrict-file-names=windows --domains --no-parent
# Explained
wget \
--recursive \ # Download the whole site.
--page-requisites \ # Get all assets/elements (CSS/JS/images).
--adjust-extension \ # Save files with .html on the end.
--span-hosts \ # Include necessary assets from offsite as well.
--convert-links \ # Update links to still work in the static version.
joshbuchea /
Last active May 28, 2023 09:35
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional


MarcoWorms / mini-redux.js
Last active September 24, 2021 06:06
Redux in a nutshell
View mini-redux.js
function createStore (reducers) {
var state = reducers()
const store = {
dispatch: (action) => {
state = reducers(state, action)
getState: () => {
return state