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
| #include<cstdio> | |
| int main() | |
| { | |
| int cnt=0; | |
| while(true) | |
| { | |
| printf("%c",cnt&255); | |
| fflush(stdout); | |
| fprintf(stderr,"%d bytes\n",cnt); | |
| cnt++; |
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
| use std::{io,time}; | |
| use argparse::{ArgumentParser, Store}; | |
| fn main() { | |
| let mut delay = 1000; | |
| { | |
| let mut parser = ArgumentParser::new(); | |
| parser.refer(&mut delay).add_option(&["-t", "--time"],Store, "Delay per line in miliseconds"); | |
| parser.parse_args_or_exit(); | |
| } | |
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
| javascript:(function(){t = document.getElementById('contents');s=Array.from(t.getElementsByTagName('tr')).slice(1,-1).map(x=> x.firstElementChild.innerText).join(", ");alert(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
| // Remote/delayed reboot | |
| // Problem: I have machine which randomly has a problem with spawning new processes. | |
| // It makes debugging this issue hard as I cannot ssh into the machine, and I have to ping | |
| // somebody in the server room to reboot the machine | |
| // Thankfully it seems that system and processes are still running as the machine is opening | |
| // TCP or even TLS connections. | |
| // Crude solution: Service that uses sysrq file to reboot the machine, exposed via http (over some vpn) | |
| // Additionaly it has delayed reboot functionality so it could reboot the machine even if network is broken | |
| // It could use some TLS cert authentication, but meh. |