Each day at our company, developers are required to document their activities, painstakingly jotting down their daily work and future plans. A monotonous chore that I just really dislike.
So now, there's a scribe for that :
Each day at our company, developers are required to document their activities, painstakingly jotting down their daily work and future plans. A monotonous chore that I just really dislike.
So now, there's a scribe for that :
// This code looks for syntax like `{{youtube: https://www.youtube.com/watch?v=dQw4w9WgXcQ}}` | |
// rather than a plain URL, but it should be simple enough to modify the regex. | |
// Call this function on your raw markdown before your markdown processor (e.g. Marked, ReMark, etc) is run on it, | |
// and then pass the output of this function to your markdown processor. | |
function embedYoutubeVideos(md: string): string { | |
const ytRegexGlobal = /{{youtube: ?([^{}]+)}}/g; | |
const matches = md.matchAll(ytRegexGlobal); | |
let output = md; |
using Stateless; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
namespace WorkFlow { | |
public class MyStateMachine<T, TTrigger> { | |
private readonly static object locker = new object(); | |
private readonly T _element; |
This is a very minimal bit of polyfill code for when you want to use some basic p5.js code you wrote, but not pay the performance cost associated with importing the whole kitchen sink.
It basically implements some of the sintactic sugar I use the most from p5.js but using the Canvas api, so that I have the p5 api but without all the magic I'm probably not using in this particular sketch.
terraform { | |
required_providers { | |
digitalocean = { | |
source = "digitalocean/digitalocean" | |
} | |
} | |
} | |
provider "digitalocean" { | |
} |
HackerNews discussed this with many alternative solutions: https://news.ycombinator.com/item?id=24893615
I already have my own domain name: mydomain.com
. I wanted to be able to run some webapps on my Raspberry Pi 4B running
perpetually at home in headless mode (just needs 5W power and wireless internet). I wanted to be able to access these apps from public Internet. Dynamic DNS wasn't an option because my ISP blocks all incoming traffic. ngrok
would work but the free plan is too restrictive.
I bought a cheap 2GB RAM, 20GB disk VM + a 25GB volume on Hetzner for about 4 EUR/month. Hetzner gave me a static IP for it. I haven't purchased a floating IP yet.
After you copy a component from the Tailwind UI library and begin to adapt it from Vue JS to Alpine JS .. you may wonder what to do about the transitions. As I'm exploring this myself, I am documenting it for others in the same boat.
const trimText = (input = '', maximumLength = 80) => { | |
const exceedsMaximum = input.length >= maximumLength; | |
return { | |
exceedsMaximum, | |
text: exceedsMaximum ? `${ input.substr(0, input.lastIndexOf(' ', maximumLength)) }...` : input, | |
} | |
}; | |
export default trimText; |
This document was originally written several years ago. At the time I was working as an execution core verification engineer at Arm. The following points are coloured heavily by working in and around the execution cores of various processors. Apply a pinch of salt; points contain varying degrees of opinion.
It is still my opinion that RISC-V could be much better designed; though I will also say that if I was building a 32 or 64-bit CPU today I'd likely implement the architecture to benefit from the existing tooling.
Mostly based upon the RISC-V ISA spec v2.0. Some updates have been made for v2.2
The RISC-V ISA has pursued minimalism to a fault. There is a large emphasis on minimizing instruction count, normalizing encoding, etc. This pursuit of minimalism has resulted in false orthogonalities (such as reusing the same instruction for branches, calls and returns) and a requirement for superfluous instructions which impacts code density both in terms of size and
public static class MappingExtensions | |
{ | |
/// <summary> | |
/// Applies the specified <paramref name="transformation"/> on the <paramref name="source"/>. | |
/// </summary> | |
/// <typeparam name="TSource"></typeparam> | |
/// <typeparam name="T"></typeparam> | |
/// <param name="source"></param> | |
/// <param name="transformation"></param> | |
/// <returns></returns> |