The simplest hello world program you can write in C.

This is a very simple Hello World program that you can write in C. int main (void) {   write (1, "Hello World\n", 14); return 0; }int main (void) { write (1, "Hello World\n", 14); return 0; } Just compile the program like this: localhost% cc minimal.c -o small minimal.c: In function โ€˜mainโ€™: minimal.c:2:5: warning: … Read more

Linux Mint 17 RC now available. Download it with these direct links.

Linux Mint 17 is now available. Download this new Linux release from this handy mirror site. http://ftp.heanet.ie/mirrors/linuxmint.com/testing/. 64 bit ISO 1.3 Gigabytes: http://ftp.heanet.ie/mirrors/linuxmint.com/testing/linuxmint-17-mate-dvd-64bit-rc.iso. 32 bit ISO 1.3 Gigabytes: http://ftp.heanet.ie/mirrors/linuxmint.com/testing/linuxmint-17-mate-dvd-32bit-rc.iso. This new Linux distribution has all the same features that Linux Mint 16 had, but with all new software. I am trying out the RC build … Read more

How to enter the product key in Windows server 2012 R2.

Entering the product key in server 2012 sometimes is fraught with frustration. You can try to enter it via the CMD command prompt with this command. PS C:\Users\Administrator> slmgr -ipk XXXX-XXXX-XXXX-XXXXPS C:\Users\Administrator> slmgr -ipk XXXX-XXXX-XXXX-XXXX and you get an error. The best way is to use this command. PS C:\Users\Administrator> sluiPS C:\Users\Administrator> slui This command … Read more

How to re run a previous command in your history with sudo privileges.

This is how to rerun a previous command with sudo if you forgot the sudo command to elevate privileges. Here I have tried to cat a file and I have forgotten to elevate my privileges with the sudo command. homer@calculate ~ $ cat /etc/shadow cat: /etc/shadow: Permission deniedhomer@calculate ~ $ cat /etc/shadow cat: /etc/shadow: Permission … Read more

Some useful Windows commands to use in the cmd window. Get information about your user.

This command lists the information about your user. C:\Users\homer>net user Administrator User name Administrator Full Name Comment Built-in account for administering the computer/domain User’s comment Country code 000 (System Default) Account active No Account expires Never   Password last set 11/2/2006 11:08:15 PM Password expires Never Password changeable 11/2/2006 11:08:15 PM Password required Yes User … Read more

How to change the default plymouth theme manually on Ubuntu 14.10.

Change the default Plymouth theme on Ubuntu Changing the default plymouth theme on Ubuntu 14.10 is not very difficult. Just type this at the shell prompt. This will set the new theme. root@homer-eME730:~# update-alternatives –install /lib/plymouth/themes/default.plymouth default.plymouth /lib/plymouth/themes/ubuntustudio-logo/ubuntustudio-logo.plymouth 100root@homer-eME730:~# update-alternatives –install /lib/plymouth/themes/default.plymouth default.plymouth /lib/plymouth/themes/ubuntustudio-logo/ubuntustudio-logo.plymouth 100 Now we need to save our changes. root@homer-eME730:~# update-alternatives –config … Read more

Some useful Linux commands and tricks for the bash shell user.

The boxes utility for Linux allows you to render an ascii text box around text. Below is an example. homer@homer-eME730 19:14:21 ~ $ echo `echo "This is a sentence printed to the terminal."` | boxes /***********************************************/ /* This is a sentence printed to the terminal. */ /***********************************************/homer@homer-eME730 19:14:21 ~ $ echo `echo "This is a … Read more

Useful things that you can do with putty to access your home Internet connection from work or school.

The putty ssh client allows you to access your home computer over the Internet using ssh; but you can also tunnel past a proxy and access websites using putty. This means that you can access your home Internet connection through a proxy easily. You need to use port 443 in your openssh configuration to enable … Read more

Why Xorg on Linux starts up on tty7. And how to change this.

Why does Xorg use tty7? This is for the purpose of switching. Switching to that console (Alt-F7 from another text console, Ctrl-Alt-F7 from another instance of X) activates its display and input, switching away deactivates it. You can start other instances of X, and they will use more consoles (8, 9, etc.). Internal details of … Read more

How to use VNC to connect to a remote Linux machine and administer it with the graphical desktop.

Using tightvnc to connect to a remote Linux machine is a good way to access a graphical desktop on a remote Linux box. Firstly; install the tightvnc server on the target machine to be accessed. homer@deusexmachina ~ $ sudo apt-get install tightvncserver [sudo] password for homer: Reading package lists… Done Building dependency tree Reading state … Read more

My Mikrotik PPTP configuration file. This is a working config.

This is a working PPTP configuration I used to connect two Mikrotik routers together using a PPTP configuration on a local LAN. # jan/01/2002 01:56:00 by RouterOS 6.2 # software id = 8HHI-TYLD # /interface bridge add admin-mac=D4:CA:6D:31:02:53 auto-mac=no l2mtu=1598 name=bridge-local \ protocol-mode=rstp /interface wireless set 0 band=2ghz-b/g/n channel-width=20/40mhz-ht-above disabled=no distance=\ indoors l2mtu=2290 mode=ap-bridge ssid=MikroTik-310257 … Read more

How the design of the user interface has changed from the olden days of the computer.

The computer user interface has come a long way since the early days of the computer. This has not always been for the best. The iMac screen below shows a good example of UI design. This is a very usable and fast interface. The Finder allows you to find applications easily and also navigate the … Read more

Useful Macintosh OSX terminal commands to get information about your iMac.

The mount command shows information about your mounted partitions on your machine. iMac305:~ admin$ mount /dev/disk0s2 on / (hfs, local, journaled) devfs on /dev (devfs, local, nobrowse) map -hosts on /net (autofs, nosuid, automounted, nobrowse) map auto_home on /home (autofs, automounted, nobrowse) map -fstab on /Network/Servers (autofs, automounted, nobrowse) /dev/disk0s3 on /Volumes/Scratch (hfs, local, journaled)iMac305:~ … Read more

How to install virtualbox guest additions in Ubuntu when it is running as a virtualbox guest.

If you are running Ubuntu in Virtualbox and you need the Virtualbox Guest Additions to get better performance and higher resolutions, then type this command to install the required drivers. You will need the kernel headers installed to enable this command to complete sucessfully. But this works very well. sudo apt-get install virtualbox-guest-x11 I tried … Read more

How using ssh is a better way to access your remote machine. How to do this over port 443.

Using the ssh command to connect to a remote computer is a very good way to access your home machine when you are at college or at work. But sometimes you are behind an academic proxy and this blocks your ssh access. I had that problem and I used putty to connect to my home … Read more

Using tcpdump to capture packets with a wireless connected computer.

Use this command to capture packets with the tcpdump command. This will output to STDOUT, but you may use redirection to divert it to a text file. [root@deusexmachina homer]# tcpdump -i wlp2s0[root@deusexmachina homer]# tcpdump -i wlp2s0 This is the output that you get when you are capturing packets. This is on my home network, so … Read more

Some useful FizzBuzz examples for budding programmers.

Here are some useful FizzBuzz programming examples in various programming languages. These might prove useful as code samples that could be expanded into a larger project or just for interests sake. Very useful if you wish to learn how to program, taking these programs apart and modifying them would be a lot of fun. In … Read more

How to add a custom menu to Fluxbox to list your favorite applications.

Adding a custom menu to Fluxbox is very easy, this is how. The default ~/.fluxbox/fluxbox-menu file looks like this, it reads the /etc/X11/fluxbox/fluxbox-menu file to create the root menu for Fluxbox. [begin] (fluxbox)   [include] (/etc/X11/fluxbox/fluxbox-menu) [end][begin] (fluxbox) [include] (/etc/X11/fluxbox/fluxbox-menu) [end] But if you add a simple submenu to it like this, then you get … Read more