Skip to content

Instantly share code, notes, and snippets.

View hub33k's full-sized avatar
⌨️

Hubert hub33k

⌨️
View GitHub Profile
@matthen
matthen / hello_world.py
Last active November 25, 2024 21:51
Hello world in python, using genetic algorithm
"""Hello world, with a genetic algorithm.
https://twitter.com/matthen2/status/1769368467067621791
"""
import random
import time
from dataclasses import dataclass
from itertools import chain
from typing import Iterable, List
@passivestar
passivestar / Editor.tres
Last active January 12, 2025 21:14
Godot editor theme
[gd_resource type="Theme" load_steps=12 format=3 uid="uid://7bvxnk5n5imx"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_6h42l"]
content_margin_left = 10.5
content_margin_top = 8.75
content_margin_right = 10.5
content_margin_bottom = 8.75
bg_color = Color(0.117647, 0.117647, 0.117647, 1)
draw_center = false
border_color = Color(1, 1, 1, 0.137255)
@jamiepine
jamiepine / settings.json
Last active December 12, 2024 16:30
VSCode Settings
{
"editor.fontSize": 13,
"editor.lineHeight": 1.8,
"editor.fontWeight": "normal",
"debug.console.fontFamily": "dank mono, monaco, monospace",
"editor.fontFamily": "dank mono, monaco, monospace",
"workbench.iconTheme": "bearded-icons",
"editor.fontLigatures": true,
// "workbench.colorCustomizations": {
// "editorGutter.background": "#131521",
@CodyJasonBennett
CodyJasonBennett / index.ts
Last active May 31, 2023 07:59
WebGL 2 Compute via Transform Feedback
/**
* Matches against GLSL shader outputs.
*/
const VARYING_REGEX = /[^\w](?:varying|out)\s+\w+\s+(\w+)\s*;/g
/**
* Adds line numbers to a string with an optional starting offset.
*/
const lineNumbers = (source: string, offset = 0): string => source.replace(/^/gm, () => `${offset++}:`)
@DavidWells
DavidWells / github-proxy-client.js
Last active March 3, 2025 17:47
Full Github REST api in 34 lines of code
/* Ultra lightweight Github REST Client */
// original inspiration via https://gist.github.com/v1vendi/75d5e5dad7a2d1ef3fcb48234e4528cb
const token = 'github-token-here'
const githubClient = generateAPI('https://api.github.com', {
headers: {
'User-Agent': 'xyz',
'Authorization': `bearer ${token}`
}
})
function partition(inputArray, callback) {
const result = {};
for (const [indexOfValue, value] of inputArray.entries()) {
const propertyKey = callback(value, indexOfValue);
if (propertyKey === null || propertyKey === '') {
continue;
}
if (!{}.hasOwnProperty.call(result, propertyKey)) {
result[propertyKey] = [];
}

What Hiring Should Look Like

This is definitely not the first time I've written about this topic, but I haven't written formally about it in quite awhile. So I want to revisit why I think technical-position interviewing is so poorly designed, and lay out what I think would be a better process.

I'm just one guy, with a bunch of strong opinions and a bunch of flaws. So take these suggestions with a grain of salt. I'm sure there's a lot of talented, passionate folks with other thoughts, and some are probably a lot more interesting and useful than my own.

But at the same time, I hope you'll set aside the assumptions and status quo of how interviewing is always done. Just because you were hired a certain way, and even if you liked it, doesn't mean that it's a good interview process to repeat.

If you're happy with the way technical interviewing currently works at your company, fine. Just stop, don't read any further. I'm not going to spend any effort trying to convince you otherwise.

@miszo
miszo / clearChromePasswords.js
Created August 3, 2020 11:28
Unfortunately it is impossible to clear all passwords at one in Chrome. But since it is written with web technologies, you can navigate through DOM and ShadowDOM. It works with Chrome v84.
// Unfortunately it is impossible to clear all passwords at one in Chrome.
// But since it is written with web technologies, you can navigate through DOM and ShadowDOM.
// It works with Chrome v84.
// 1. Go to chrome://settings/passwords
// 2. Open console, paste code below or run it as a snippet in devtools
(() => {
const interval = setInterval(() => {
const kebabMenu = document.querySelector('settings-ui').shadowRoot.children.container.querySelector('settings-main').shadowRoot.querySelector('settings-basic-page').shadowRoot.querySelector('#basicPage settings-autofill-page').shadowRoot.querySelector('#pages settings-subpage #passwordSection').shadowRoot.querySelector('#passwordList').querySelector('password-list-item').shadowRoot.querySelector('cr-icon-button#passwordMenu');
const removePasswordButton = document.querySelector('settings-ui').shadowRoot.children.container.querySelector('settings-main').shadowRoot.querySelector('settings-basic-page').shadowRoot.querySelector('#basicPage set
@raysan5
raysan5 / custom_game_engines_small_study.md
Last active April 24, 2025 05:27
A small state-of-the-art study on custom engines

CUSTOM GAME ENGINES: A Small Study

a_plague_tale

A couple of weeks ago I played (and finished) A Plague Tale, a game by Asobo Studio. I was really captivated by the game, not only by the beautiful graphics but also by the story and the locations in the game. I decided to investigate a bit about the game tech and I was surprised to see it was developed with a custom engine by a relatively small studio. I know there are some companies using custom engines but it's very difficult to find a detailed market study with that kind of information curated and updated. So this article.

Nowadays lots of companies choose engines like Unreal or Unity for their games (or that's what lot of people think) because d