Content
Programming and other nerdy things!
Wednesday 31 October 2012
-
Filed under
Code Snippet + Encryption + Python + Security + Utility
Plain and simple, rsa encryption in python. Not the best implementation, I’m sure but it seems to work ok-ish. Feel free to modify, re-distribute or even upgrade it!
(more…)
::
Share or discuss
::
2012-10-31 ::
mono
Friday 13 July 2012
-
Filed under
Archival + Compression + HTML + Javascript + Learning + PHP + Programming + Web + Zip
This is based on some code that I wrote for a website several years ago. As a website concept, it never really took off, but the idea is neat and who knows, some people may find it useful to create zip files of various files which they find on the internet. I’m not sure how much of a tutorial this will be seeing as it’s in a way written with the specific purpose of working standalone. I stripped a lot of the specifics out so right now it is just a husk of php and html with no styling, however it is very straightforward where everything should be going so if you wish to add your own css chic to it, it should not be difficult. There is a lot of code here so I think the detail in this article will not be great, there are comments here and there in the code to explain parts though.
(more…)
::
Share or discuss
::
2012-07-13 ::
mono
Wednesday 11 July 2012
-
Filed under
Encryption + Mathematics + Programming + Python + Security + Utility
I just want to make this minor post before I publish the article which will explain the actual code which will do the RSA encryption. A little introduction to RSA first, I suppose. RSA is a method of encryption which involves public and private information. It uses Gaussian modular arithmetic to encode values into an encrypted string. I will just write a little background on the modular arithmetic, hopefully this will help you with some of the concepts which are used in the encryption.
(more…)
::
Share or discuss
::
2012-07-11 ::
mono
Friday 29 June 2012
-
Filed under
Code Snippet + HTML + PHP + Programming + Utility + Web
<?php
function download($file)
{
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
header('Content-Length: ' . filesize($file));
header('Content-Disposition: attachment; filename=' . basename($file));
readfile($file);
}
?>
(more…)
::
Share or discuss
::
2012-06-29 ::
mono
Wednesday 27 June 2012
-
Filed under
CAPTCHA + Forms + HTML + Learning + PHP + Programming + Security + Web
Sometimes I find that when I am creating websites with input forms and I am in a rush or need to get something down which I know will work, CAPTCHA can be annoying. It is one of those things which is quite necessary to get correct on your website but at the same time it normally feels like there should be something more substantial which you are spending your time on. Needless to say that normally I cannot be bothered to download and faff around with loads of API things. This is not to say that this is a long term fix because ideally you want the highest amount of protection and pre-built things like reCAPTCHA certainly do a very good job. This is more something which can go in place which there is other things to sort out. Also GD is quite fun, even if this is a very simple example.
(more…)
::
Share or discuss
::
2012-06-27 ::
mono
Monday 25 June 2012
-
Filed under
GUI + Programming + Python + Software Development
As I have been developing my Brainf*** Interpreter, I noticed that there are not many obvious sources for finding out how to create working menu’s in a desktop program that you are creating with PyQt. I’ll try to keep this post as concise as possible, but it will not be particularly difficult since the process is actually rather easy. The easiest way to show you how to do this is to give the step-by-step process including setting up the program ui itself, though I will not go into installing PyQt unless requested, but there are plenty of other resources and websites which can tell you how to do that, including the PyQt homepage itself.
(more…)
::
Share or discuss
::
2012-06-25 ::
mono
Tuesday 12 June 2012
-
Filed under
Brainfuck + General + GUI + Mathematics + Programming + Python + Software Development
Infrequent previous updates have been due to real life work right now. In my spare time I have been working on a GUI Brainfuck interpreter. Brainfuck is an esoteric, turing-complete programming language. If you would like to know more, click here! I’ll just quickly talk about brainfuck and how development is going so far. (View changelog/notes here).
I ran across Brainfuck a while ago while browsing the “99 bottles of beer” challenge website. Brainfuck looked like one of the most fun languages to write on that website (along with Malbolge) because when you first look at it, it looks absolutely crazy! Once I started learning it, I figured it was something that is actually quick easy to pick up but difficult to master – as can be proved if you google brainfuck programs. Nevertheless, after some time playing around with the language, I decided that I had two goals: the first was to improve my current knowledge of python and gui desktop programming and the other was to allow myself (and others) easier access to the development of brainfuck programs. This is not to say that what I am creating is a compiler by any means. I don’t actually know how difficult that would be because I have never really looked into compiler development (although I’m told it’s difficult). Anyway this program is currently no more than an interpreter. An interpreter with added features I might add!
(more…)
::
Share or discuss
::
2012-06-12 ::
mono
Saturday 9 June 2012
-
Filed under
Computers + Languages + Learning + Miscellaneous + Reddit + Russian + Youtube
Learn a new language: Russian (LANL_russian) was in need of some extra resources. If you are interested in learning russian, feel free to ask there for help.
Additionally the resources put out there to help out are:
The Princeton Russian Guide (direct html download, free) – A good introduction to grammar, speaking, writing and learning vocabulary with Russian. At 1.5gb it’s pretty large but has all the audio required for the course packed in with it.
Also I decided to make a video which teaches you how to set up your keyboard so you can directly type in Russian. Useful if your keyboard does not automatically do this and you find yourself needing to type in Russian a lot! It can be seen below!
(more…)
::
Share or discuss
::
2012-06-09 ::
mono
Monday 2 January 2012
-
Filed under
GUI + Mathematics + Programming + Python
Shortly after I started learning python, I begun learning about inverse matrices for work at school. While they’re not very difficult to work out, some of the problems that I had to work on for homework were quite time consuming. So I thought to myself “is there any way that I can speed up homework with my knowledge of programming, and even better why don’t I use python!”
I had not actually done any desktop programming prior to this and so I started looking around for some GUI api’s for python. I believe there is an affinity in some sense with TK but I ran across some problems which at the time of writing this I cannot remember but I seem to recall that some of the documentation wasn’t really very good. And that is when I ran across QT. This was the perfect way to start my desktop programming “career” so to speak. After some searching I found a set of PyQt tutorials translated from Polish. Because of this, at some points they can be a bit confusing and that are some amendments that need to be made in the source code of the translated version as some variable names are still in Polish.
(more…)
::
Share or discuss
::
2012-01-02 ::
mono