Skip to content

Instantly share code, notes, and snippets.

View gjtiquia's full-sized avatar
🔥
Having fun!

GJ Tiquia gjtiquia

🔥
Having fun!
View GitHub Profile
@robin-hartmann
robin-hartmann / bundler.js
Last active January 3, 2024 08:00
npm workspaces support for electron-forge
// based on https://github.com/electron-userland/electron-forge/issues/2306#issuecomment-1034882039
'use strict';
/**
* @typedef {{
* new (options: { path: string }): {
* loadActual(): Promise<Node>
* }
* }} Arborist
*/
@rensjaspers
rensjaspers / slowly-rotate-page.js
Last active February 23, 2023 03:47
Slowly rotate page prank
(function(){
var deg = 1;
var body = document.getElementsByTagName("body")[0];
body.style.overflow = "hidden";
body.style.transition = "1000ms linear all";
setInterval(function() {
body.style.transform = `rotate(${deg/5}deg)`;
deg ++;
},1000);
@don
don / hexStringToArrayBuffer.js
Created May 3, 2018 17:54
Convert hex string to ArrayBuffer
/**
* Convert a hex string to an ArrayBuffer.
*
* @param {string} hexString - hex representation of bytes
* @return {ArrayBuffer} - The bytes in an ArrayBuffer.
*/
function hexStringToArrayBuffer(hexString) {
// remove the leading 0x
hexString = hexString.replace(/^0x/, '');

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?