Skip to content

Instantly share code, notes, and snippets.

View oyekanmiayo's full-sized avatar
🎯
Focusing

Ayomide Oyekanmi oyekanmiayo

🎯
Focusing
View GitHub Profile
@mrnugget
mrnugget / gc_resources.md
Created February 26, 2023 12:11
Resources I used so far (26 feb 2023) to build a GC for my toy compiler
[gchb]: https://gchandbook.org/
[clawing]: https://blog.mozilla.org/javascript/2013/07/18/clawing-our-way-back-to-precision/
[gsgc]: https://piumarta.com/software/gsgc/index.shtml
[migc]: https://github.com/playXE/migc
[yarpenruntime]: https://github.com/mdlugajczyk/yarpen/blob/master/runtime/yarpen_runtime.c
[bdwgc]: https://www.hboehm.info/gc/
[bdwgcslides]: https://www.hboehm.info/gc/04tutorial.pdf
[bdwdescr]: https://hboehm.info/gc/gcdescr.html
[writinginterpretersinrust]: https://rust-hosted-langs.github.io/book/introduction.html
[gcandrustpart0]: http://blog.pnkfx.org/blog/2015/10/27/gc-and-rust-part-0-how-does-gc-work/
// by dave @beesandbombs
int[][] result;
float t, c;
float ease(float p) {
return 3*p*p - 2*p*p*p;
}
float ease(float p, float g) {
@zjeaton
zjeaton / _Google Analytics 4 with Hugo.md
Last active May 23, 2024 01:13
Google Analytics 4 (with Measurement ID) in Hugo

Google Analytics 4 in Hugo

Blog post with slightly more detail can be found here. If you want to just get to it, read on.

I (very) recently decided to reimplement GA in my site, and found that existing implementation in Hugo was not compatible with GA4's new Measurement ID. This is an easy way to drop your Measurement ID into your site. I'm not going to go into how to sign up for GA.

This implementation requires that you create a site parameter for analytics, create a partial, and call the partial. I tweaked the names of the parameters and files so they didn't collide with the built-in hugo code.

Place the GoogleAnalyicsID (Measurement ID) in config.toml within [params].

@Youngestdev
Youngestdev / Omo.md
Created August 8, 2020 19:04
Maths is somehow and fibonacci is great.

Lovely Lucky LAMBs

Being a henchman isn't all drudgery. Occasionally, when Commander Lambda is feeling generous, she'll hand out Lucky LAMBs (Lambda's All-purpose Money Bucks). Henchmen can use Lucky LAMBs to buy things like a second pair of socks, a pillow for their bunks, or even a third daily meal!

However, actually passing out LAMBs isn't easy. Each henchman squad has a strict seniority ranking which must be respected - or else the henchmen will revolt and you'll all get demoted back to minions again!

There are 4 key rules which you must follow in order to avoid a revolt: 1. The most junior henchman (with the least seniority) gets exactly 1 LAMB. (There will always be at least 1 henchman on a team.) 2. A henchman will revolt if the person who ranks immediately above them gets more than double the number of LAMBs they do.

@chidiwilliams
chidiwilliams / main.go
Last active August 3, 2020 13:08
My Solution to Find Treasure App (Ileya Game)
package main
import (
"encoding/json"
"fmt"
"log"
"math"
"net/http"
"os"
"time"
@Farhan-Haseeb
Farhan-Haseeb / README
Created June 17, 2020 16:51
How to reopen a closed PR on Github
How to reopen a pull-request from github?
Precodinitions
You need the rights to reopen pull requests on the repository.
The pull request hasn't been merged, just closed.
Go to Pull requests add filter `is:closed` choose PR you want to reopen. Select from checkbox and mark as Open.
@mathdroid
mathdroid / never.gif
Last active February 11, 2024 22:25
Never
never.gif
@ServerlessBot
ServerlessBot / IAMCredentials.json
Last active December 20, 2023 16:50
Minimum credential set for Serverless Framework
{
"Statement": [
{
"Action": [
"apigateway:*",
"cloudformation:CancelUpdateStack",
"cloudformation:ContinueUpdateRollback",
"cloudformation:CreateChangeSet",
"cloudformation:CreateStack",
"cloudformation:CreateUploadBucket",
@DavidWells
DavidWells / aws-lambda-redirect.js
Created June 28, 2018 20:48
How to do a 301 redirect from an AWS lambda function
exports.handler = (event, context, callback) => {
const response = {
statusCode: 301,
headers: {
Location: 'https://google.com',
}
};
return callback(null, response);
}
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active June 30, 2024 08:42
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example