Skip to content

Instantly share code, notes, and snippets.

View CastCris's full-sized avatar
:octocat:
Gatû

Cristiano CastCris

:octocat:
Gatû
View GitHub Profile
@CastCris
CastCris / gist:80711bbc6629140ec2fcb99d607e9d30
Last active February 2, 2026 01:37
This Mindustry code check if a entity E is in the player vision and fill the display1 with white color if entity in player vision, else black
set min_distance 7
set vision_angle 45
set first_unit null
ubind @dagger
jump 68 equal first_unit @unit
jump 7 notEqual first_unit null
set first_unit @unit
radar player any any distance @unit 1 p_unit
set a p_unit
set b @this
@CastCris
CastCris / gist:7f7bd90386b279ac6bf8db55c05295bf
Last active February 1, 2026 15:31
This Mindustry code get the sin and cos of angle b^a^c, let b = the player_unit, a = @ this (itself block) and c = a point that x = (bx - ax) and y = (by - ay), and print_flush the sin and cos to a message_1 and message_2 block respectively.
radar player any any distance @this 1 p_unit
set a @this
set b p_unit
sensor a_x a @x
sensor a_y a @y
sensor b_x b @x
sensor b_y b @y
op sub a_distance_x b_x a_x
op sub a_distance_y b_y a_y
op pow a_distance_x_power a_distance_x 2
[Appearance]
ColorScheme=IndustryScheme
Font=DEC Terminal,11,-1,5,400,0,0,0,0,0,0,0,0,0,0,1
[Cursor Options]
CursorShape=0
[General]
Name=Industry
Parent=FALLBACK/
@CastCris
CastCris / .bashrc
Created September 14, 2025 15:31
My bashrc
#
# ~/.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
alias ls='ls --color=auto'
alias grep='grep --color=auto'
alias batery='cat /sys/class/power_supply/BAT0/capacity'
@CastCris
CastCris / .vimrc
Created September 14, 2025 15:31
My vimrc
set nocompatible
filetype on
filetype plugin on
filetype indent on
syntax on
"
set cursorline
set cursorcolumn
"
set nu