Skip to content

Instantly share code, notes, and snippets.

View bokwoon95's full-sized avatar
💭
effective. Power لُلُصّبُلُلصّبُررً ॣ ॣh ॣ ॣ 冗

bokwoon95

💭
effective. Power لُلُصّبُلُلصّبُررً ॣ ॣh ॣ ॣ 冗
View GitHub Profile
@faustinoaq
faustinoaq / myAngular.html
Last active November 16, 2024 04:17
Front-end libraries (React, Vue, Angular) and the basic principles of how they work, all in a single file using pure JavaScript (VanillaJS).
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My Angular from Scratch</title>
<style>
.my-component {
font-family: Arial, sans-serif;
@rmtbb
rmtbb / ChatGPT Canvas HTML Renderer from Clipboard.url
Last active November 10, 2024 20:51
Bookmarklet that lets you render a full HTML page with any included css and javascript that is currently copied to your clipboard. Also works for SVG code. Useful with ChatGPT Canvas
javascript:(function(){try{navigator.clipboard.readText().then(function(t){if(t){var e=window.open("","_blank","width=800,height=600");e.document.open(),e.document.write(t),e.document.close()}else alert("Clipboard is empty. Please copy some text to the clipboard first.")}).catch(function(t){console.error("Failed to read clipboard contents: ",t),alert("An error occurred while trying to access the clipboard. Please ensure your browser allows clipboard access.")})}catch(t){console.error("An error occurred:",t),alert("An error occurred while trying to open the new window with the clipboard content.")}})();//bookmarklet_title: HTML Preview from Clipboard
@MarvinJWendt
MarvinJWendt / Go Module Count by Domain
Created April 8, 2024 23:35
Count of all Go modules by domain as of 2024.04.09
Total go modules: 1288407
github.com: 1218651
gitlab.com: 12372
gitee.com: 8497
gopkg.in: 5746
go-micro.dev: 3494
github.com: 3209
github.com: 2487
bitbucket.org: 2347
@OrionReed
OrionReed / dom3d.js
Last active November 15, 2024 17:48
3D DOM viewer, copy-paste this into your console to visualise the DOM topographically.
// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks.
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/)
(() => {
const SHOW_SIDES = false; // color sides of DOM nodes?
const COLOR_SURFACE = true; // color tops of DOM nodes?
const COLOR_RANDOM = false; // randomise color?
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com)
const MAX_ROTATION = 180; // set to 360 to rotate all the way round
const THICKNESS = 20; // thickness of layers
const DISTANCE = 10000; // ¯\\_(ツ)_/¯
@toraritte
toraritte / mxroute-add-email-subdomain.md
Last active October 24, 2024 16:22
Add email subdomains - MXROUTE email service provider and DirectAdmin control panel

The Setting up SPF and DKIM records of a subdomain thread on StackExchange goes more into the details.

1. Log in to DirectAdmin

In the [MXroute] Important Account Information email there is a section titled "Login Info:", similar to

=====
===== Login Info:
=====
@joepie91
joepie91 / es-modules-are-terrible-actually.md
Last active November 15, 2024 13:58
ES Modules are terrible, actually

ES Modules are terrible, actually

This post was adapted from an earlier Twitter thread.

It's incredible how many collective developer hours have been wasted on pushing through the turd that is ES Modules (often mistakenly called "ES6 Modules"). Causing a big ecosystem divide and massive tooling support issues, for... well, no reason, really. There are no actual advantages to it. At all.

It looks shiny and new and some libraries use it in their documentation without any explanation, so people assume that it's the new thing that must be used. And then I end up having to explain to them why, unlike CommonJS, it doesn't actually work everywhere yet, and may never do so. For example, you can't import ESM modules from a CommonJS file! (Update: I've released a module that works around this issue.)

And then there's Rollup, which apparently requires ESM to be u

hi, and goodbye

The past few weeks has not been fun on IRC, the drama based on false information and assumptions has been insane. I've almost entirely been silent on the drama because I know the fallout that would happen if I spoke up.

A quick TLDR - I'm quitting all IRC development. KiwiIRC project lead, IRCv3 technical board, supporting the multitude of IRC networks, the lot.

Many people seem to think that I am supporting one side in everything that is going on, so just to be clear: I am not supporting any side of the current freenode drama - there is so much false information going around from everywhere that it is impossible to support anybody.

Woo freenode drama

It appears that rasengan (Andrew Lee) of Private Internet Access believes that ownership of the company Freenode Ltd. gives him the right to unilaterally replace the current staff team.

We may have had our disagreements with staff, but freenode being run by a volunteer team, using servers provided by sponsors, is a key reason that we appreciate freenode.

As such, we do not believe that such a unilateral replacement by a corporate interest is appropriate.

If this attemped takeover by Andrew Lee continues, we will be advocating to move our communities elsewhere.

Context: Fuchs' leaked (not by him) draft resignation letter that caused Andrew Lee to come onto #freenode: https://fuchsnet.ch/privat/fn-resign-letter.txt

@no-defun-allowed
no-defun-allowed / dbyol.org
Last active June 25, 2024 00:37
Don't Build Your Own Lisp

Don’t Build Your Own Lisp

I feel somewhat pressed to give a negative review of this book. This comes from someone who has worked on various Lisp implementations, and written some amount of C, but that isn’t an excuse to be overly harsh. This book, however, does not provide many nice things to say, and plenty of un-nice things. My apologies in advance.

First off: God help you if you are going to write your first interpreter in C of all things. No one I know thinks it’s a good idea to start

@mlaflamm
mlaflamm / README.md
Last active September 12, 2023 20:22
Custom types wrapper for go-jet generator

We love go-jet! We are now using it or migrating it to, in all our projects. This is simply the best go SQL builder we have tried so far. It is type safe thanks to the code generation and the query result mapping is very powerful. As far as we know, this is the only solution that fully supports mapping of LEFT OUTER JOIN out of the box.

We have used straight sql package, sqlx, squirrel with and without sqlx, and more recently sqlboiler. The latter is an ORM rather than an SQL builder but we love the type safety with code generation. Also their null types package is a breeze to work with. But over time, sqlboiler being an ORM, showed its limitations in terms of performance and flexibility.