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
#!/bin/sh | |
# GiGomma | |
# LICENSE: GPL-3.0-or-later [https://spdx.org/licenses/GPL-3.0-or-later.html] | |
#| Matteo Vinci [Iranon] (c) 2022 | | |
#NOTE: Gum needed [https://github.com/charmbracelet/gum] | |
#- Colors |
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
#!/bin/bash | |
#Text Colors | |
GREEN='\033[0;32m'; | |
BLUE='\033[0;34m'; | |
RED='\033[0;31m'; | |
PURPLE='\033[0;35m'; | |
NOCOLOR='\033[0m'; | |
wait_for_resolution() { |
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
/*<link rel="stylesheet" type="text/css" href="./css/markdown-custom-style.css">*/ | |
* { | |
color: rgb(24, 8, 12); | |
} | |
hr { | |
background-image: linear-gradient( to right, #91FF46, #AAD852 ) !important; | |
} |
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
export const generateNoiseValue = (x: number) => { | |
const rand = (x: number) => (Math.sin(x) * 1.0) % 1; | |
const hermineCurve = (n: number) => n*n*(3.0-2.0*n); | |
const mix = (a: number, b: number, t: number) => (1 - t)*a + t*b; //linear interpolation | |
let i = Math.floor(x); //integer | |
let f = x % 1; //fraction | |
return mix(rand(i), rand(i + 1.0), hermineCurve(f)); | |
}; |
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
#!/bin/bash | |
# MakeDesktopFile | |
#| Matteo Vinci [Iranon] (c) 2022 | | |
help_message=\ | |
"Usage: $0 [option] FILENAME\n\n\ | |
Valid options are:\n\ | |
'-h': print this message\n\ | |
'-c': create the .desktop file in the current folder\n\ |
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
/*============================================================================== | |
|| From Perlin Noise implementation in p5.js || | |
|| @'https://github.com/processing/p5.js/blob/v1.4.0/src/math/noise.js#L36' || | |
==============================================================================*/ | |
//--- The resulting value will always be between 0.0 and 1.0 --- | |
const PERLIN_YWRAPB = 4; | |
const PERLIN_YWRAP = 1 << PERLIN_YWRAPB; | |
const PERLIN_ZWRAPB = 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
#!/bin/bash | |
#- CopyToHTTPD | |
#|-- Matteo Vinci [Iranon] (c) 2021 --| | |
#Text Colors | |
RED='\033[0;31m'; | |
NOCOLOR='\033[0m'; | |
#File | |
if [[ -f $1 ]]; then |
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 java.util.Random; | |
public class Garden { | |
private Unit[][] grid; //The grid represents the game field | |
private int[] gridSize = new int[2]; | |
private boolean isGameOver = false; | |
private String lastMove = "0"; | |
//Create a new Snake instance defining initial length and coordinates | |
private Snake snakePlayer = new Snake(3, 7, 2); |