This file contains hidden or 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
#self.rb#5#;#6#;#9#;#9#;#4#;#5#;#6#;#7#;#9#;#6#;#4### self.rb | |
## CHARACTERS | |
CHARS = [] ; c = 0 ; 256.times{ CHARS << c.chr.to_s ; c += 1 } | |
## every 8 bit binary number in cardinal order | |
BINARY = [] ; c = 0 ; 256.times { b = c.to_s(2) ; until b.to_s.length == 8 ; b = "0" + b.to_s ; end ; BINARY << b ; c += 1 } | |
## every hexicdeimal number in order | |
HEX = [] ; c = 0 ; 256.times { h = c.to_s(16) ; if h.length == 1 ; h = "0" + h.to_s ; end ; HEX << h ; c += 1 } | |
## a list of all 8 bit byte codes for the ascii characters | |
#BYTES = [] ; HEX.each do |h| ; BYTES << "\\x" + h ; end | |
##system/region termonology |
This file contains hidden or 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
c=0 ; s=nil ; 100.times{ c+=1 ; print c.to_s + " " | |
if c % 3 == 0 ; print "FIZZ"; s=true; end | |
if c % 5 == 0 ; print "BUZZ "; s=false; end | |
if s; print " "; s=false; end } |
This file contains hidden or 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
#begin | |
puts "Welcome to the rubin system installer, your system is being checked..." | |
launch_directory=Dir.getwd | |
launch_time=Time.now | |
puts "Launching from the installer files directory location." | |
puts "" | |
puts "Dir: "+launch_directory.to_s |
This file contains hidden or 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
#begin | |
puts "Welcome to the rubin system installer, your system is being checked..." | |
launch_directory=Dir.getwd | |
launch_time=Time.now | |
puts "Launching from the installer files directory location." | |
puts "" | |
puts "Dir: "+launch_directory.to_s |
This file contains hidden or 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
require 'ruby2d' | |
#window config | |
set width: 300, height: 200 | |
set title: "" | |
set background: 'black' | |
#set fullscreen: true | |
@square = Square.new(x: 10, y: 20, size: 25, color: 'blue') |
This file contains hidden or 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
def surname | |
int=self.to_s | |
if int.to_s=="0";int="0" | |
elsif int[-2..-1]=="11" or int[-2..-1] =="12" or int[-2..-1] =="13" | |
int<<"th" | |
elsif int[-1]=="1";int<<"st" | |
elsif int[-1]=="2";int<<"nd" | |
elsif int[-1]=="3";int<<"rd" | |
else;int<<"th" | |
end |
This file contains hidden or 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
require 'win32/sound' | |
include Win32 | |
Time.class.class.class_eval{ | |
def parse_seconds(s) ## get an array for timer displays of number of seconds [days:hours:minutes:seconds] | |
s = s.to_s.to_f | |
if s.to_f < 60.0 | |
[0,0,s.to_i] |
This file contains hidden or 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
require 'win32/sound' | |
include Win32 | |
Time.class.class.class_eval{ | |
def parse_seconds(s) | |
s = s.to_s.to_f | |
if s.to_f < 60.0 | |
[0,0,s.to_i] |
This file contains hidden or 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
## rubin entry point is the rubin sys class file right now | |
## but could become this file in the future | |
##this file should never be anything more than a shortcut | |
## shortcuts to this file can have their own window config | |
load Dir.getwd.to_s+'/sys/rubin.rb' |
This file contains hidden or 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
current_update 2021.11.6.7.2 | |
A bunch of ruby code i use to write | |
more complex ruby apps | |
more info and classes are being added all the time with the last major version change being september 2021 now at 7.2 | |
version rollover soon!!! (less than 2 weeks now, so much is about to be fixed with dir and file, im releasing an encoder too) | |
next: | |
shadow cert | |
gem manager |