Skip to content

Instantly share code, notes, and snippets.

View jarrodhroberson's full-sized avatar

Jarrod Roberson jarrodhroberson

View GitHub Profile
@daniel5151
daniel5151 / callback_manager.h
Last active February 3, 2022 09:07
Generic Callback Manager
#pragma once
#include <vector>
#include <cstddef>
/**
* Generic Callback Manager
*
* @tparam ...cb_args Types of callback arguments (aside from userdata)
*/
@diegum
diegum / bitset_iter.h
Last active September 19, 2025 04:14
Missed an iterator for C++ STL bitset? Have mine!
// bitset_iter.h v1.1.0
// Copyright 2019, Diego Dagum
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
@arei
arei / IntroZephJS.md
Last active June 26, 2020 01:15
Introducing ZephJS!

Introducing ZephJS

We are pleased to announce the release of ZephJS!

ZephJS is an extremely easy to use, simple to understand, ultra-light framework for defining and using Web Components. ZephJS is perfect for people writing component libraries, teams building applications or sites that just require a few custom components, or projects building whole applications that do not want the gigantic weight of a modern JavaScript browser framework. ZephJS simplifies the process of defining custom Web Components into a highly readable declarative structure that uses standard JavaScript, standard HTML markup, and standard CSS styling. And ZephJS weighs in at less than 20k minified!

Here's an example of using ZephJS to build a customized button:

my-button.js
@jarrodhroberson
jarrodhroberson / tictactoe.py
Created July 25, 2019 17:10
Python 3 TicTacToe Game for Console
# Import needed modules
import os
import time
import re
# Regular Expression to validate that the input is in the expected format!
inputPattern = re.compile('^\d{1},\d{1}$')
#Initialize a 2D array to represent the board using a SPACE to represent unclaimed cells.
board = [[' ' for x in range(3)] for y in range(3)]

Some notes on transparency in social systems

This is the PC sitting on my desk right now:

...as you can see, it is literally transparent - you can look right into it! The components and physical connections between them, laid bare - they even put stupid lights on many of the components now, anticipating this level of transparency. Must be pretty easy to see how it works, right?

Well, no, of course not. Most of the interesting stuff is still obscured, happening at an atomic level inside what are literal black boxes. The layer at which it is transparent is irrelevant to most of the problems I might have to solve. When discussing the potential benefits of, costs of, and need for transparency in a system, it is critical to first establish the layer being discussed - otherwise, you may very well end up with a gaudy display that serves no real purpose. This is as true in social systems as it is in physical ones such as

@thomaspoignant
thomaspoignant / Makefile
Last active August 30, 2025 22:19
My ultimate Makefile for Golang Projects
GOCMD=go
GOTEST=$(GOCMD) test
GOVET=$(GOCMD) vet
BINARY_NAME=example
VERSION?=0.0.0
SERVICE_PORT?=3000
DOCKER_REGISTRY?= #if set it should finished by /
EXPORT_RESULT?=false # for CI please set EXPORT_RESULT to true
GREEN := $(shell tput -Txterm setaf 2)
@rcshubhadeep
rcshubhadeep / main.go
Created July 21, 2021 18:12
full code
package main
import (
"errors"
"fmt"
"strconv"
"gonum.org/v1/gonum/graph"
"gonum.org/v1/gonum/graph/multi"
)