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 'socket' | |
require 'date' | |
require 'securerandom' | |
host = '127.0.0.1' | |
port = 2575 | |
def send_messages(host, port, facilities, count) | |
names = ['Swaniawski Lavonne', 'Blick Melyssa', 'Schiller Dorothea', 'Lemke Malinda', 'Fahey Margot', 'Fritsch Muhammad', 'Connelly Elena', 'Stiedemann Declan', 'Leffler Logan', 'Hermiston Theodora', 'Koelpin Edwardo', 'Walter Jaren', 'Schuster Delaney', 'Lubowitz Melisa', 'Langosh Murl', 'Mraz Marina', 'Hamill Ardella', 'Gerhold Tabitha', 'Schaden Enola', 'Farrell Mohammed', 'Kassulke Bobby', 'Crist Kurtis', 'Heller Alexys', 'McKenzie Eloy', 'Nikolaus Gianni', 'Littel Rebecca', 'Schuster Lucy', 'Mayer Zella', 'Reilly Phoebe', 'Auer Colton', 'Hessel Emerson', 'Schuppe Jordan', 'Goodwin Paolo', 'King Guy', 'Heathcote Pietro', 'Spencer Laurence', 'Heathcote Selina', 'Brown Reginald', 'Quitzon Orpha', 'Howe Otho', 'Hansen Desiree', 'Feil Marley', 'Casper Bryana', 'Schmeler Royce', 'Auer Enrique', 'Hilll Liliana', 'Kiehn Lisandro', 'Eichmann Jerrold', 'Wuckert Eloisa', 'Schimm |
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 "socket" | |
host = '206.135.179.69' | |
port = 2575 | |
s = TCPSocket.open(host, port) | |
msg = readlines | |
s.puts "\v" + msg[0..3].join("\r") | |
sleep 1 | |
s.puts msg[4..-1].join("\r") + "\x1c\r" |
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
class MemStore | |
def get(klass, id) | |
Rails.cache.fetch("#{cachize(klass)}_#{id}") do | |
klass.find(id) | |
end | |
end | |
def remove(klass, id) | |
Rails.cache.delete("#{cachize(klass)}_#{id}") | |
end | |