Strange happening when creating an image with AI.
AI image generators can create strange results with random prompts.
Read MoreAI image generators can create strange results with random prompts.
Read MoreThis script in the initPlayerLocal.sqf will play a continuous jukebox of music in your Arma 3 mission. This is just like in Warlords where you have continuous background music. _null = [] spawn { _musicPool = "getText (_x >> ‘name’) != ” && getNumber (_x >> ‘duration’) > 20" configClasses…
Read MoreThis is an interesting version of my random monster program. I added a simple function to get a random number in milliseconds. randommonster.c1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28…
Read MoreThis is an improved version of my random monster program. This shows how to get the size of a const char array and then select a random entry from the array. monsters.c1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19…
Read MoreThis simple shell script will pick a random sentence from a text file. This is made up of multiple sentences from parts of the text file merged into one long sentence. words.sh1 2 3 4 5 #!/bin/sh numwords=$(shuf -i 14-88 -n 1) words=$(shuf -n $numwords 122-0.txt | cut -d$”…
Read MoreThis is a very interesting bash trick I found using ls. This runs the ls command with random parameters. This is not very useful, but interesting nonetheless. 4.4 Tue Mar 03 jason@Yog-Sothoth 0: $ ls -`cat /dev/urandom | tr -dc ‘hula’ | head –bytes 1`4.4 Tue Mar 03 jason@Yog-Sothoth 0:…
Read MoreSpawning random enemies can be troublesome in Arma 3. But this makes it easier. This will spawn the enemies in the middle of the map and this will find a safe location to spawn them. Fixed code for 2022. Loc = [worldSize / 2, worldsize / 2, 0]; SafePos2…
Read MoreThis code generates a random string when run, this could be quite useful. Print some very useful Linux system information using C. These two C programming samples should be quite useful to any programmer on Linux. Print a random fortune from an array. This program prints a random fortune from…
Read MoreHere is one of my programs. I wrote this ages ago and it uses the standard ASCII character set. This will print a random fortune by running the fortune app to get a fortune and this selects a category to print from. #include <stdio.h> #include <stdlib.h> #include <time.h> #include <unistd.h>…
Read MoreThis simple command prints out a long random number string from /dev/urandom. jason@Yog-Sothoth » img » $ tr -dc "[:digit:]" < /dev/urandom | head -c 64 ; echo 9958048462925775253231939134565711861924198983498274782350446110 Do it this way to remove the newline after the output. This would be good for use in a script. jason@Yog-Sothoth…
Read MoreA nice shell prompt that is randomly generated each time it appears. Working version. PS1="\[\e[1;31m\]$(shuf -n 1 /usr/share/dict/words)\[\e[m\]@\[\e[1;35m\]$(shuf -n 1 /usr/share/dict/words)\[\e[m\]\$ "PS1="\[\e[1;31m\]$(shuf -n 1 /usr/share/dict/words)\[\e[m\]@\[\e[1;35m\]$(shuf -n 1 /usr/share/dict/words)\[\e[m\]\$ " Select a random word from a textfile with bash. ubuntu ~ $ shuf -n 1 /usr/share/dict/words pluckedubuntu ~ $ shuf -n…
Read MoreThe mpv movie player can play a directory of movies randomly, this is useful if the user wants movies playing randomly in the background. Do it like this. mpv –shuffle /media/jason/Seagate\ Backup\ Plus\ Drive/Movies/**mpv –shuffle /media/jason/Seagate\ Backup\ Plus\ Drive/Movies/** This is the result, a randomly chosen movie from your collection….
Read MoreThis simple code for Arma 3 will spawn a randomly placed HQ building within the area of the mkr1 marker. This is a 4000×4000 marker placed on the map. This gets a random safe area and places the building within the area of this marker. _mrk = "mkr1"; _area =…
Read MoreTo get useful Ubuntu server command line tips in your terminal, firstly install the fortune package and some more fortunes. ┌─[jason@darkstar]─[~] └──╼ $sudo apt install fortune fortunes-bofh-excuses fortunes-ubuntu-server┌─[jason@darkstar]─[~] └──╼ $sudo apt install fortune fortunes-bofh-excuses fortunes-ubuntu-server Now run the command to print a random Ubuntu server tip. ┌─[jason@darkstar]─[~] └──╼ $fortune ubuntu-server-tips…
Read MoreFetch information about a random Linux command. curl -sL commandlinefu.com/commands/random/plaintext | sed ‘3,4!d’curl -sL commandlinefu.com/commands/random/plaintext | sed ‘3,4!d’ Here is an example. ┌─[jason@neo]─[~] └──╼ $curl -sL commandlinefu.com/commands/random/plaintext | sed ‘3,4!d’ # An easter egg built into python to give you the Zen of Python echo "import this" | python┌─[jason@neo]─[~] └──╼…
Read MoreThis is a simple random number example in C. This will print a random number from 1 – 64. #include <stdio.h> #include <stdlib.h> int main (void) { srand(time(NULL)); int r = rand() % 64; printf("Random INT: %i\n", r); return 0; }#include <stdio.h> #include <stdlib.h> int main…
Read MoreThis code will pick a random word from the x[] array and include it in the printed string. This program will also get your current Linux username to customize the output. I am sure this code would be very useful to someone who wants to know how to handle arrays…
Read MoreThis code is on my https://securitronlinux.com/linux/ page. It shows a random image and a random webpage link. <?php $time = strftime(“%A %d %B %Y. %r – %Z”); srand(time(NULL)); $day = rand() % 6; $string = sprintf(“<font size=\”2pt\”><p>Welcome to my website.</p>\n”); $links = array(“BejArray” => array(“0” => “perl_code.php”, “1” => “psx_doom.php”,…
Read More