mirror of
https://github.com/jimeh/.emacs.d.git
synced 2026-02-19 13:46:41 +00:00
feat(misc): add rand-ip command to insert a random IPv4 address
This commit is contained in:
@@ -38,5 +38,13 @@
|
||||
(dotimes (_ (if (numberp NUM) (abs NUM) 16 ))
|
||||
(insert (elt charset (random baseCount))))))
|
||||
|
||||
(defun rand-ip ()
|
||||
"Insert a random IPv4 address."
|
||||
(interactive)
|
||||
(insert (concat (int-to-string (random 255))
|
||||
"." (int-to-string (random 255))
|
||||
"." (int-to-string (random 255))
|
||||
"." (int-to-string (random 255)))))
|
||||
|
||||
(provide 'siren-rand)
|
||||
;;; siren-rand.el ends here
|
||||
|
||||
Reference in New Issue
Block a user