# Some possibly useful Julia code: Getpwnam, NetworkInterfaces, hrbc

**URL:** https://discourse.julialang.org/t/some-possibly-useful-julia-code-getpwnam-networkinterfaces-hrbc/32238
**Category:** General Usage
**Created:** [December 13, 2019, 6:07pm UTC](https://discourse.julialang.org/t/some-possibly-useful-julia-code-getpwnam-networkinterfaces-hrbc/32238 "2019-12-13T18:07:03Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![mleisher](https://avatars.discourse-cdn.com/v4/letter/m/8edcca/32.png) [@mleisher](https://discourse.julialang.org/u/mleisher)
#### Post date: [December 13, 2019, 6:07pm UTC](https://discourse.julialang.org/t/some-possibly-useful-julia-code-getpwnam-networkinterfaces-hrbc/32238/1 "2019-12-13T18:07:03Z")

</div>

In pursuit of my own amusements, I whipped up some code I needed for a personal project:

> **[GitHub - mleisher/JuliaTidbits: Random Julia code/modules that might be...](https://github.com/mleisher/JuliaTidbits)**
>
> Random Julia code/modules that might be useful to someone. - GitHub - mleisher/JuliaTidbits: Random Julia code/modules that might be useful to someone.

Getpwnam.jl  
This module implements getpwnam() for Julia. The Windows-specific portion is kludgy, but my project doesn’t depend on the values being precise, just that some approximation of the relevant data exist.

NetworkInterfaces.jl  
This module collects a list of network interfaces from the Linux/Unix, Mac OS, or Windows device, ignoring the loopback device. Once again, kludgy support for Mac OS and Windows, but it is sufficient for my personal project.

hrbc.jl  
Functions to print byte counts in “human readable” form.

Feel free to modify for your own uses, just please attribute the original code to me. Enjoy.
