Simple script to check if there is a sudo session open (ignoring remaining time available if set) and prompt user for password to open one if not open.
Pacific Simplicity is the home to my tech blog of sorts, aiming to assist and provide information easily to other Linux users and Open Source hackers out there. It contains articles on Linux, system admin hints, scripting, programming embedded systems, OpenWRT and of course Drupal . Check it out and don't forget to comment!
As part of the processing of exploring some infrastructure for my thesis - I noticed that the SNMPD documentation needed some love despite the many eyes of the Internet. Here is how I set snmpd up in Ubuntu 15.10 for localhost access to IP-related information contained within the IP MIB.
Install the following:
sudo apt-get install snmp snmp-mibs-downloader snmpd libsnmp-dev
I recently ran across some code for some students that was terribly written regarding sockets and upon helping them - I realized, that most examples just abhorrently throw all of the required code into the program with no function calls to help segment/make sense of it.
Here is my example programs - note that the actual socket code is wrapped up in socket.c & shared.h:
Here is a quick ring buffer example, I wrote up for a hackathon.
* @file data_struct.c
* @author Ron Brash (ron.brash @ gmail.com)
* @brief Simple array ring buffer, its not super careful, but illustrates the connect
#define ELEMENT_SIZE 32
Creating custom menu items is simple - all you need to do is this inside of your package (OpenWRT) Makefiles
CATEGORY:=<YOUR NEW SECTION WHICH IS IN THE ROOT OF THE MENU>
SUBMENU:=<YOUR NEW SUBSECTION INSIDE OF YOUR NEW CATEGORY ITEM>
- 1 of 22
- next ›