This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// A small test program of me trying Odin + Box2D + Raylib | |
// Made during this stream: https://www.youtube.com/watch?v=LYW7jdwEnaI | |
// I used these bindings https://github.com/cr1sth0fer/odin-box2d download them and put them in a sub-folder "box2d" next to this file. | |
// Then you can build using `odin run .` | |
package game | |
import b2 "box2d" | |
import rl "vendor:raylib" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
function p() { | |
jq -n \ | |
--arg content "$*" \ | |
'{ | |
"model": "pplx-7b-online", | |
"messages": [ | |
{ | |
"role": "system", | |
"content": "Be precise and concise." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Change these variables as necessary. | |
main_package_path = ./cmd/example | |
binary_name = example | |
# ==================================================================================== # | |
# HELPERS | |
# ==================================================================================== # | |
## help: print this help message | |
.PHONY: help |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# juggling_balls_game.py | |
import turtle | |
import time | |
import random | |
from juggling_balls import Ball | |
# Game parameters | |
WIDTH = 600 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# juggling_balls.py | |
import random | |
import turtle | |
class Ball(turtle.Turtle): | |
MAX_VELOCITY = 5 | |
GRAVITY = 0.07 | |
BAT_VELOCITY_CHANGE = 8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pygame | |
import random | |
colors = [ | |
(0, 0, 0), | |
(120, 37, 179), | |
(100, 179, 179), | |
(80, 34, 22), | |
(80, 134, 22), | |
(180, 34, 22), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"type": "cortex-debug", | |
"servertype": "openocd", | |
"request": "launch", | |
"name": "tinygo-debug", | |
"runToEntryPoint": "main.main", | |
"executable": "${workspaceRoot}/out.elf", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module samw.dev/ebiten | |
go 1.15 | |
require ( | |
github.com/aquilax/go-perlin v1.1.0 | |
github.com/hajimehoshi/ebiten/v2 v2.2.4 | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/bash | |
# zn - as zettell | |
# new export variables EDITOR for your editor and | |
#+ NOTES for your notes folder. | |
main () { | |
note_id=$(date +'%Y%m%d%H%M%S') | |
$EDITOR $NOTES/"$note_id".md | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// by dave | |
float[][] result; | |
float t, c; | |
float ease(float p) { | |
p = c01(p); | |
return 3*p*p - 2*p*p*p; | |
} | |
float ease(float p, float g) { |
NewerOlder