Skip to content

Instantly share code, notes, and snippets.

View davidsharp's full-sized avatar

David Sharp davidsharp

View GitHub Profile
@straker
straker / README.md
Last active October 20, 2023 13:13
Basic Bust-a-Move / Puzzle Bobble / Bubble Shooter HTML and JavaScript Game

Basic Bust-a-Move / Puzzle Bobble / Bubble Shooter HTML and JavaScript Game

This is a basic implementation of the game Bust-a-Move / Puzzle Bobble / Bubble Shooter, but it's missing a few things intentionally and they're left as further exploration for the reader.

Further Exploration

  • More levels
  • Add more levels and have the next level start once the last one is finished
@DavidWells
DavidWells / javascript-proxy-as-rest-client.js
Last active October 6, 2023 18:39
Using a javascript proxy as low code REST client
/* Using a JavaScript proxy for a super low code REST client */
// via https://dev.to/dipsaus9/javascript-lets-create-aproxy-19hg
// also see https://towardsdatascience.com/why-to-use-javascript-proxy-5cdc69d943e3
// also see https://github.com/fastify/manifetch
// also see https://github.com/flash-oss/allserver
// and https://gist.github.com/v1vendi/75d5e5dad7a2d1ef3fcb48234e4528cb
const createApi = (url) => {
return new Proxy({}, {
get(target, key) {
@davidsharp
davidsharp / remark-star-wipe.css
Last active November 26, 2021 10:20
A neat little star wipe for Remark.js presentations
@-webkit-keyframes wipe {
0% {
-webkit-mask-size: 0% 0%;
}
100% {
-webkit-mask-size: 550% 550%;
}
}
.remark-visible .remark-slide-content {
@gullyn
gullyn / flappy.html
Last active November 28, 2023 18:23
Flappy bird in 205 bytes (improved!)
<body onload=z=c.getContext`2d`,setInterval(`c.width=W=150,Y<W&&P<Y&Y<P+E|9<p?z.fillText(S++${Y=`,9,9|z.fillRect(p`}*0,Y-=--M${Y+Y},P+E,9,W),P))):p=M=Y=S=6,p=p-6||(P=S%E,W)`,E=49) onclick=M=9><canvas id=c>
@DanShappir
DanShappir / pipe_pipe.js
Created November 1, 2020 09:55
Implementation of piping function
function pipe(arg, ...fns) {
return fns.reduce((v, fn) => fn(v), arg);
}
@JShorthouse
JShorthouse / gba-gcc-compiling-linux.md
Last active February 25, 2024 01:44
Compiling GBA programs on Linux with GCC

Compiling GBA programs on Linux with GCC

There is a strange lack of guides and tools online for compiling Gameboy Advance homebrew programs on Linux. I didn't want to use devkitpro - their installation method of requiring you to use a forked version of pacman is extemely strange and I didn't want to install all of that on my system just to complile some programs.

The only other guides I found for Linux were this one and this one which both involve compiling custom versions of GCC and assosicated libraries. This lead me down a road of pain, after spending multiple hours fixing compiler errors only to create new errors I gave up. I thought that their had to be a simpler way, and there is!

The solution

Debian already has a version of GCC that can compile ARM programs in the repos, no manual compiling necessary! The package is called arm-none-eabi-gcc.

@tomhicks
tomhicks / plink-plonk.js
Last active March 18, 2024 02:23
Listen to your web pages
@qubyte
qubyte / index.html
Created November 13, 2019 12:35
Conway's Game of Life. I put this together quickly as something to iterate on as a generative art project.
<!DOCTYPE html>
<html lang="en">
<head>
<script type="module" src="index.js"></script>
<title>Game of Life</title>
<meta charset="utf-8">
</head>
<body>
<h1>Game of Life</h1>
<canvas width="600" height="600"></canvas>
@davidsharp
davidsharp / index.html
Last active March 12, 2022 19:02
React, but in an Electron Fiddle
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Hello World!</title>
<script src="https://unpkg.com/babel-standalone@6/babel.min.js"></script>
</head>
<body>
<div id="hello-example"></div>
@joelnet
joelnet / boolean-expressions-ski.js
Last active August 5, 2019 08:42
Boolean Logic with the SKI Combinators
// S and K are primitive function combinators.
const S = a => b => c => a (c) (b (c))
const K = a => b => a
// Non-primitive combinators can be created with S and K.
const C = S (S (K (S (K (S)) (K))) (S)) (K (K))
const I = S (K) (K)
const KI = K (I)
const M = S (I) (I)
const R = S (K (S (K (S)) (K))) (S (K (S (I))) (K))