Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# uses github.com/defunkt/gist
## run `gem install gist`
## make sure to run `gist --login` on install
# uses github.com/astrand/xclip
## run `sudo apt install xclip`
# this could be anything and it'll use zenity, nothing and it won't
use_zenity=""
#!/bin/bash
# uses github.com/defunkt/gist
## run `gem install gist`
## make sure to run `gist --login` on install
# uses github.com/astrand/xclip
## run `sudo apt install xclip`
# this could be anything and it'll use zenity, nothing and it won't
use_zenity=""
#include <allegro5/allegro.h>
#include <iostream>
class Vector {
public:
Vector(int x, int y);
Vector();
Vector operator+(Vector &);
private:
.PHONY: clean
all: *.o
g++ *.o
%.o: %.cpp
g++ -c $(CXXFLAGS) $^
clean:
-rm *.o
template <class T = float> class Vector {
public:
T x;
T y;
Vector() : x(T(0)), y(T(0)){};
Vector(T inx, T iny) : x(inx), y(iny){};
Vector<double> normalize() {
double len = this->length();
return Vector<double>(this->x / len, this->y / len);
};
@creikey
creikey / top-1000-nouns.txt
Created December 30, 2019 17:25
Top 1000 English Nouns
time
way
year
work
government
day
man
world
life
part
@creikey
creikey / App.css
Created December 8, 2023 22:30
This is a nice lights out mini game, just throw this into a default vite project the npm run dev
.game-container {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
min-height: 100vh;
padding: 20px;
}
.controls {