danieljon.es

index posts opinions portfolio

Posts

My posts about programming and things.
Date format is day/month/year because I'm sane.

prev 1 2 3 4 5 6 7 8 9 10 11 12 13 next

New server, now running my own e-mail server

8/4/2016

The world still exists, amazing.
have spent the last two days setting up and configuring a new server that will, in-time replace the one I was once using for everything.
Things setup:

Things that still need to be done: This is my first time configuring and administering an e-mail server and it has gone amazingly well so far.
I do need help however.
I need to know what e-mail hosting websites/services tag my email as spam/junk, it'd be great if you could send me an email at admin@danieljon.es naming the service you are using, i'll then reply and get you to tell me if it was junked or set as spam!
Services known to mark my e-mail as spam/junk: Services known to NOT mark my e-mail as spam/junk: Much appreciated.

Rid myself of WordPress

31/3/2016

Over the past few days I have been converting my WordPress blog media/posts and have integrated them into my own blog-like page.
WordPress is scary with all of its vulnerabilities, at least I now have security through obscurity!


My Arch Linux system - software I use daily and how I do what I do

12/3/2016

As a computer enthusiast I am quite surprised I haven't gone into detail about how I use my system and the hardware I run - so, lets do it.
A good start would of course be my physical hardware, I'm curently running:
- i7 3770k stock
- 16GB Hyper-X blu ddr3 memory
- Nvidia GTX 660Ti
- 128 GB main bootdrive SSD
- 2TB data storage HDD
- 1TB local backup HDD
- 2* Acer V243HQ monitors
- Razer Deathstalker keyboard
- Logitech G502 gaming mouse
- Logitech G230 headset
and, like any good *nix guy, a screenfetch (you can click on an image for a bigger view):
post25_1
Now that the boring stuff is out of the way, lets get into the juicy software I use daily and the things I use them for!
[Operating System & Window Manager]
Arch Linux - Ah yes, good old Arch, I wont bother going into details, but it is what all the cool kids use ;)
i3 - This is a tiling window manager, of which I have covered before.
[Media & Media Management]
mplayer - this is a lightweight media player I use to watch .. things I have downloaded locally.
cmus - this is a terminal based msuic player that has one job, and does it exceedingly well, it plays my music! cmus has a nice commandline program that allows one to pause/play etc, this makes it easy to integrate into my key inputs such as my pause/play button etc
ranger - this is a terminal based file manager, I use it souley for selecting videos to play with mplayer, I do my general file management through the terminal.
[Entertainment]
ssh - Ah, good old ssh, I use this protocol to connect to my various servers and *nix boxes for remote server management, I, and many other people would be clueless as to what to do without ssh.
irssi - this is an Internet Relay Chat aka life client that I use over an ssh connection, I chat with many people around the world, I mainly hangout in programming/computer related channels, I also run my own IRC server, you can catch me over at irc.danieljon.es in #fun, identify yourself though, I remove anyone I don't know fast.
[Internet Browsing]
conkeror - this is an internet browser that is based upon FireFox and has the mind of a programmer - being lazy. It was created to be used without a mouse and has emacs-style key shortcuts, it has a large learning curve, but is very, very useful once you master it.
FireFox - this bastard program opens up when I open a link in irc because I'm too lazy to change the default program.
[Production]
lxterminal - this is a terminal emulator that I have recently decided to use, I was at one point using konsole, but its memory usage was just too high. This program is used to do many things: cmus, ranger, ssh, irssi, file management etc
vim - the enemy of emacs, this is an extremly powerful, terminal based text editor that I use for everything from writing notes, editing configuration files to programming in various languages - yes, I use vim instead of an actual IDE for programming, it just feels more comfortable to me.
[Local Media Server]
motion - I use motion on my media server to record via a camera mounted on my roof, it points towards our driveway, it is a good way to both know when people are coming/leaving and recording any no-gooders that may be in my area. I have it setup to take pictures when it detects motion - if I ever die bloody, check my media server for evidence!
apache2 - this is webserver software, I run it to provide me with an easy way to access my cameras stream.
tvheadend - this is DVR software, I use it to stream tv signals through my local network - although I don't really use it anymore.
If I have missed anything, I'll add to the list at a later date.
Resource usage:
I certainly am not lacking in resources, I generally keep my ram usage under 1gb, yes, I know, I have 16, I just like small numbers.
post25_2
post25_3
I love my setup and computer, I'd go ahead and provide some nice fancy images of both my setup and current desktop, but, I'm lazy.


All domains (that serve content) on my server now use SSL

2/3/2016

Thanks to LetsEncrypt all domains running on this server now enforce SSL.
Domains affected:
danieljon.es
xmx.fyi
dummiesman.com
tankfootball.com
This literally does nothing more for myself, or you than provide a fancy green lock in your browser, well, it does encrypt all your traffic, but we don't exactly provide services to many people.
post24_1


SSH isn't playing ball nicely

18/2/2016

Recently we have switched ISPs, and with that came a monthly data allowance skyrocketing that of the measly 300GB we had previously.
I in need of a way of obscuring myself online, a VPN, and it just so happens that I have one floating around in use by a close few.
It was about damn time I used something I'm paying for.
Blah blah blah, an OpenVPN install and configuration later I was ready to connect to the service.
I live my life through IRC. I'm on it all day every day, only missing a single line of text when i'm sleeping and I do this all through IRSSI running on my server. I connect to this server via the SSH protocol and thus, if SSH were to suddenly stop working, I would literally be clueless as to what to do.
I'm using IRSSI for IRC, I can't go back to a scrub X application, ew.
But, what do you know, SSH simply does not work through my VPN... or so I thought.
I was experiencing an issue initiating an initial connection to my server, when run in verbose mode the following line is where it hung everytime:
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY

I quickly came across this bug report: https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/1254085
Interesting I thought; apparently other SSH clients can initiate a connection and work correctly!
So I went ahead and installed PuTTY (a GUI SSH client), and what do you know, I was able to connect without a single hitch!
So, it was at this point I knew it was specifically an OpenSSH client issue. Great, perfect, amazing.
It has been suggested to change MTU values on eth0 .. now i've tried this, however it just isn't working.
And that is that - even now, I cannot SSH into my server while using my VPN.
I bet you expected a happy ending, nope. I'm going to bed and just might cry.


Conkeror, Ranger and Cmus

11/2/2016

Chrome and VLC - the utter basics for any respectable computer owner. Both applicatons are cross-platform and run beautifully on Linux - great.
However, something all versions share is an extremely heavy footprint, RAM wise.
I had decided to stop using them.
Now with both of these applications gone I was then free to use my own alternatives - the choices were plentiful, but I settled on two applications. Conkeror and Cmus.
If you know me I like to make things difficult real difficult. I insisted I find myself a CLI (terminal based, no graphics etc) file browser and music player - as well as a really, really complicated web browser. And oh boy did I find them all.
Conkeror: Ah, the internet we all know, just in a really, really, really hard to learn manner! Conkeror is a purely keyboard driven web browser. Which means one thing, a mouse is no longer needed! Everything is driven with complicated fancy key combinations, you aren't interested, but if you are, you should totally check it out.
Ranger: Ranger is a purely CLI based file manager. It does exactly what "explorer" does in windows, except it is inside a terminal window. Simple!
The Ranger file manager:
post22_1
Cmus: Cmus is, once again, a purely CLI application that has one job - play music! It accomplishes this by having its own in-buit file manager purely for music. You are able to save file locations etc. And it works great!
Cmus:
post22_2
There is nothing more fun than learning new, difficult programs.


http://xmx.fyi/ our new image uploading service

4/2/2016

We're now up and running with a new, fully custom created (using PHP and MySQL) image uploader.
We currently have a register/login system running with image uploading. We're working on getting an image manager setup. Good times ahead, thanks Dummiesman!


Premature i3 window manager review

25/1/2016

It hasn't quite been a week, and I don't quite yet have it set-up exactly how I want it - but my god is it great.
First, you should know I'm fairly new to Linux, and am a complete noob.
I'm going to chop this little review up into multiple parts, ranging from the install and it's ease of use to the configuration and set-up of i3 add-ons.
But first, let me actually explain to you what the i3 window manager is.
A window manager is a piece (or collection) of software that has one job: control the border, appearance, location and maintenance of windows on the users desktop. This software also controls the functions you can use to resize, move and sometimes dock/stack windows. You use a Window manager every day. Windows has one, Apple systems too! You can learn more about a window manager here.
Before I began my journey into learning i3 I was using the default KDE window manager, kwin. And it was great.
Kwin was beautiful, and in-fact my first ever window manager. So why, one would ask would I want to switch from something I know so well, and is so familiar to that of a Windows system? Well, you literally just answered your own question, is what I would respond. I wanted something different, I was sick of having a computer look like almost every other personal computer out there - a task bar, icons, a start menu etc. I wanted to be a hipster - even more than I am now.
I'd love to stop right here and say that is the only thing that influenced my decision, but it wasn't.
I'm also lazy. I hate having to pick-up my arm and grab onto my mouse when doing something terminal based, such as programming. I wanted something that would give me full control of my windows and workspaces, I needed something for the elite, I needed a tiling window manager.
I began researching many tiling window managers, and I kept coming to a single conclusion - one that was above and beyond the rest. And so came i3.
But with i3 came a learning curve - one that was quick to learn, but vastly different from any other desktop experience I have ever had. I had to re-learn the basics of a computer. With i3 there is no minimise button, there is no maximise button and there is no close button. There is no dragging windows, or resizing windows. Instead, everything is done automatically, your windows getting smaller each time you open a new one. Of-course, you can change the positions and sizes, but only (mainly) with your keyboard.
Another luxury given up by deciding to use i3 is that of a start menu. Instead, you are required to use an alternate program launcher, in my case I'm currently using dmenu.
dmenu is a small application that allows me to start any program installed on my machine. By default, the hot-key to launch dmenu is mod+d (mod in my case is the Windows key), in which I kept. You are then prompted with a small bar at the top of your screen in which you type the program you want to launch, dmenu then looks at your installed programs and provides you with the appropriate options of which you select with your arrow keys.
Here is an example of what my second monitor currently looks like. Note the evenly set out windows, the lack of title bar buttons and the status bar at the bottom.
(Click image to enlarge it)
post20_1
The installation of i3 and its recommended programs (such as dmenu) was easy, kind of.
to install i3 and dmenu I only had to run a simple apt-get command, they installed like a charm. and it was great.
I opted to not use the default status bar program that i3 comes with, named i3status, instead choosing to install i3blocks, which was a different story when it came to installing.
To keep it short, I had to download and compile the source code of i3blocks and do some magic hackery to get it to actually work, but we will talk about that later.
And so, once the installation process was complete, came the fun (yet long) process of configuration.
I'm a hipster. I dislike things default, and oh my, does that sometimes cause pain, and this time was no different.
The first thing I had to configure was easy, when I first logged into an i3 session I was asked if I wanted to create a configuration file, which I did, and was then asked to select a key that would act as the 'mod' key (mentioned earlier). My two options were the super key (Windows keys, you plebs) and the alt key. This was an obvious choice for me, my alt key is already taken by irssi my IRC client, so I selected the super key.
And so there I was, initial set-up complete, I was greeted to i3, a beautiful grey blank screen! I had never been so excited to see grey in my life. This is Linux dammit, of course the screen is blank! The first thing you are supposed to do is press mod+enter, which opens a terminal window. And so I was ready to begin. I opened a second terminal for SSH'ing into my server and launching irssi - this is literally the first step to life. I then opened my browser to the i3 user guide and began doing awesome things. Using Nano (yes Nano, vi shall be learnt one day) I opened my i3 configuration file (~/.i3/config) and began customising.
I wont bore you with all the little hot-keys and changes I made to colors etc, instead I will post the most important lines.
These lines are literal life savers. i3 doesn't handle being directly out of the box too well.
These hot keys do multiple things that are critical to me:
- control volume
- control my media player (I use VLC)
- lock my computer

 
# Pulse Audio controls
bindsym XF86AudioRaiseVolume exec amixer set Master 5%+ $
bindsym XF86AudioLowerVolume exec amixer set Master 5%- $
bindsym XF86AudioMute exec --no-startup-id pactl set-sin$

# Media player controls
bindsym XF86AudioPlay exec playerctl play
bindsym XF86AudioPause exec playerctl pause
bindsym XF86AudioNext exec playerctl next
bindsym XF86AudioPrev exec playerctl previous
#lock screen
bindsym $mod+l exec ~/lock.sh
 
By the way, lock.sh uses a program called i3lock, which is an optional i3 package, it simply locks my computer, privacy is key.
Configuring i3 was easy, as well as i3blocks. Again, I wont bore you with details.
Here is a video I watched and borrowed some tips from.
https://www.youtube.com/watch?v=ARKIwOlazKI
I'm currently three days into using i3 and to put it simply, I'm loving it. I expected a learning curve far beyond what I was welcomed with, instead really, all I needed to learn was a few hot-keys and short-cuts.
I'm still tweaking things here and there, slowly improving my experience, learning new things and just having fun.
If you're interested in using i3 and need some help, ask me or the guys over at the subreddit.
Here's to more future media/posts about i3 and elitism.

A terrible function - or why I suck at programming.

18/1/2016

Now, I don't claim to be good at programming, in fact I know I'm not. I have been self-taught, there was no such thing as a programming class or course at my school or surrounding area, which sucked.
But today something different happened.
Today I found myself writing a function for my RGB controller project. I had decided to add a 'presets' feature to my project, allowing one to create RGB values they enjoy and save them to file for later use. This idea was great, so I began.
Twenty or so minutes later I was done. Done, yet highly disappointed.
Here is my controller now with the presets feature added. It is pretty useful.
post19_1
However, the point of this post is not to display new features, instead it is to come out about the shame I feel for have written a particular function that is ugly, dangerous and messy.
The function in question is displayed below and is one that is used to read the presets file that contain information to be displayed in the application.

 
void MainWindow::readPresets() // read presets from file and display them
{
    DebugLog("Reading presets from file");
    // read file if it exists, display on screen
    QFile file("/home/daniel_j/presets.cfg"); // change at some point!
    if (file.exists()) {
        file.open(QIODevice::ReadOnly | QIODevice::Text);
        QTextStream in(&file);
        while(!in.atEnd())
        {
            QString line = in.readLine();
            QStringList presetName;
            if (line.contains(":"))
            {
                presetName = line.split(":");
                ui->presetList->addItem(presetName[0] + "-" + presetName[1]);
            } else {
                DebugLog("Error parsing line: " + line);
            }
        }
    } else {
        DebugLog("Presets file does not exist");
    }
}
 
There are many issues, both dangerous and cosmetic in this function that I'd like to point out.
The first, and most dangerous is my use of line.split() and line.contains().
To put it simply, at the time I was facing "index out of range" errors when attempting to split the line retrieved from the presets file. So, the solution, I thought was simple. Check that the line contains the character I use as the character I will split later in the function, and it works. Great! But no, not at all. Later in this function I use the split function to split the line into two and store it in a 'QStringList'. Once again, it all looks like it is going to work, and it does.The issue arises later in a function that sends the RGB value to my Arduino, at this point, the program would crash and close fatally. The issue is only occurs when a user manually edits the presets file and finishes the line with the character I use to split, ':'.
The solution that I need to, and will implement is proper line checking, instead of simple contains() checks.
The final issue I will touch upon (this post is already too long) is that of my use of QFile, specifically the file location I use.
The line in question is 'QFile file("/home/daniel_j/presets.cfg"); // change at some point!'.
Ahem, let me clear my throat, NEVER HARD CODE FILE PATHS THAT ARE NOT UNIVERSAL.

The end of an era and the beginning of a new horizion

14/1/2016

post18_1
The end one of my most loved services has come.
The image uploaded service I once ran has now been taken offline.
Nobody except myself ever really used it anyway, and due to some recent happenings, bigger and better things are coming.
The biggest of which is lending my services to the creator of the game 'War World Infinity'. I won't say much about the game or creator except that you can follow their progress via their official Twitter account https://twitter.com/WarWorldInf
The game revolves around an interesting concept and I can't wait for it to become a working reality.
I am also now hosting a TeamSpeak server for a fellow CS:GO player, you can contact him via his Steam account (http://steamcommunity.com/id/Creeper_Corp500) or via TeamSpeak at danieljon.es.
If you're interested in getting a TeamSpeak server hosted for yourself, just ask! I'll be glad to provide you with one; providing I know who you are of course.
The third project is a potential upcoming project that revolves around the service that has retired today, keep up-to date here to find out more ;)
Don't worry, I will for sure keep on posting here weekly, unless I don't, in which case I don't.


prev 1 2 3 4 5 6 7 8 9 10 11 12 13 next


RSS feed
FSF member

page generated 27/9/2024 using websitegenerator in C