Skip to content

Instantly share code, notes, and snippets.

@yazgoo
Created June 4, 2024 21:53
Show Gist options
  • Save yazgoo/99be56a57041db9f1465012256926cfe to your computer and use it in GitHub Desktop.
Save yazgoo/99be56a57041db9f1465012256926cfe to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
text = "Samaritan Report Threat Assessment and Mitigation Date Current Date Time Current Time Subject Anomalous Behavior Detection and Countermeasures Summary Anomalous patterns detected in the activities of individuals within Sector 12 Probability of disruptive behavior reaching critical levels 82.5% Immediate intervention recommended to maintain societal stability Key Identified Entities 1 Individual A High likelihood of initiating a protest Risk Level High Recommended Action Surveillance escalation preemptive detention 2 Individual B Potential hacker targeting critical infrastructure Risk Level Severe Recommended Action Network isolation neutralization 3 Group X Organization planning unauthorized public assembly Risk Level Moderate Recommended Action Infiltration and dispersion Detailed Analysis Behavioral Patterns Increased communications among identified entities suggest coordination Keyword analysis reveals topics related to dissent and mobilization Network Traffic Unusual spikes in encrypted traffic indicate potential cyber attack planning Financial Transactions Sudden large withdrawals and purchases linked to logistical support for unauthorized activities Operational Directive 1 Deploy Surveillance Drones Real time monitoring of identified entities and associated locations 2 Activate Field Agents Preemptive engagement to disrupt coordination efforts 3 Implement Cyber Countermeasures Block and trace suspicious network activities Conclusion Swift and decisive actions are paramount to mitigate the identified threats Continual monitoring and adaptive response protocols are essential to uphold societal order and prevent chaos End of Report Samaritan"
# white background for all screen
puts "\e[47m"
# black foreground for all screen
puts "\e[30m"
# hide cursor
puts "\e[?25l"
# bold
puts "\e[1m"
previous_size = 0
puts `clear`
text.upcase.split(" ").each do |new_word|
frames = 10
if new_word.length < previous_size
border = " " * ((previous_size - new_word.length)/2)
word = border + new_word + border
else
word = new_word
end
frames.times do |i|
puts "\e[H"
size = [`tput lines`.to_i, `tput cols`.to_i]
puts "\n" * (size[0] / 2)
print " " * (size[1] / 2 - word.length / 2)
transition_size = previous_size + (new_word.length - previous_size) * i / (frames - 1)
transition_size = -transition_size if transition_size < 0
border = (word.length - transition_size)/2
border = -border if border < 0
print word[0..border-1] if border > 0
print "\e[4m"
print word[border..border+transition_size]
print "\e[24m"
print word[border+transition_size+1..new_word.length] if border > 0
print " " * (size[1] / 2 - word.length / 2 - 1)
puts
print " " * (size[1] / 2)
if new_word.length % 2 == 1
print "\e[38;2;200;0;0m"
print "▲"
print "\e[30m"
else
print " "
end
print " " * (size[1] / 2 - - 2)
sleep 0.05
end
previous_size = new_word.length
end
puts `clear`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment