Skip to content

Instantly share code, notes, and snippets.

View BillBarnhill's full-sized avatar
💭
Learning Rust

=Bill.Barnhill BillBarnhill

💭
Learning Rust
View GitHub Profile

Local Web Worker

Under normal circumstances, a Web Worker should be passed a URL of the script to execute. However, a local function can also be used

This is done by converting a function to a string, converting that string to a Blob, and converting that Blob to an Object URL.

Code

The code to do this would look a bit like this:

@BillBarnhill
BillBarnhill / README.md
Created May 11, 2023 13:41 — forked from Potherca/README.md
Markdown Template for Daily Scrum meetings

Daily Scrum Template

When taking part of a Daily Scrum as Scrum Master, I find it handy to take notes. This makes sure I can hand over the role, if need be. It also means I don't have to rememeber everything as I can look things up in my notes later.

Below is the structure I use as format or "template" for taking notes.

Some things of importance:

@BillBarnhill
BillBarnhill / queues.io.md
Created January 18, 2023 21:41 — forked from gtors/queues.io.md
queues.io snapshot

Queues

Job queues, message queues and other queues. Almost all of them in one place.

About

There are many queueing systems out there. Each one of them is different and was created for solving certain problems. This page tries to collect the libraries that are widely popular and have a successful record of running on (big) production systems.

@BillBarnhill
BillBarnhill / playground.rs
Created December 21, 2022 14:43 — forked from rust-play/playground.rs
Code shared from the Rust Playground
//use std::{thread, time::Duration};
//use rand::Rng;
#![feature(thread_id_value)]
use std::{thread, time::Duration, time::Instant};
use rand::Rng;
#[allow(unused_imports)]
use rayon::prelude::*;
@BillBarnhill
BillBarnhill / Returning a module name
Last active April 19, 2021 18:40 — forked from rust-play/playground.rs
Code shared from the Rust Playground
mod foo {
pub fn name() -> &'static str {
module_path!()
}
}
fn main() {
println!("Hello, {}", foo::name());
}
@BillBarnhill
BillBarnhill / Cargo.toml
Created January 18, 2020 17:52 — forked from jcdyer/Cargo.toml
Updated for v 0.12.0
[package]
name = "edge"
version = "0.1.0"
authors = ["J. Cliff Dyer <jcd@sdf.org>"]
[dependencies]
indradb = "0.12.0"
indradb-lib = "0.12.0"
serde_json = "*"
uuid = "*"

FWIW: I didn't produce the content presented here (the outline from Edmond Lau's book). I've just copy-pasted it from somewhere over the Internet, but I cannot remember what exactly the original source is. I was also not able to find the author's name, so I cannot give him/her the proper credits.


Effective Engineer - Notes

What's an Effective Engineer?

@BillBarnhill
BillBarnhill / Setting up an SQL Project
Created August 9, 2019 01:58
Setting up an Knex SQLite3 project from scratch
Configuring the setup
1. Setting up the dependices
yarn init -y (Initalises a packag.json with the default values)
yarn add knex sqlite3 (Add knex sqlite module)
yarn add jest --dev (Add jest to dev dependices)
2. Adding scripts to the package.json file
@BillBarnhill
BillBarnhill / haskell-pcap-writing.hs
Created May 29, 2018 20:07 — forked from nh2/haskell-pcap-writing.hs
Haskell PCAP writing / dump (instance Storable PktHdr)
module PktHdrStorableInstance where
import Foreign.Marshal.Utils (with)
import Foreign.Ptr (plusPtr)
import Foreign.Storable
import Network.Pcap
import Network.Pcap.Base (toPktHdr)
#include <pcap.h>
Sample project for the "Getting started with JavaFX in Clojure" ( https://coderwall.com/p/4yjy1a ) ProTip.