Matthew 6:34
"Therefore do not be anxious about tomorrow,
for tomorrow will be anxious for itself.
Sufficient for the day is its own trouble."
Sunday, 6 January 2013
Friday, 21 December 2012
Simple CMS Systems
I used to work as a webprogrammer, and every time we made a new website. I created a simple CMS system from scratch in PHP for the website owner to manage their information. It was different every time, it could be anything from a webshop to an ordinary blog-type website. But almost always there was some speciality function that was not in the CMS from start. Like being able to create a poll and manage the results, uploading pictures and having them scaled in different sizes, etc..
But also always keep it as simple as possible, so that any newbie could get into it easily. I wanted to take away as much useless information as possible, like edit slugs, features to create categories and other things that only looks too abstract for a new CMS user.
So I got an idea that I wanted to create a CMS for creating CMS systems, but still keep it extremly simple and clean.
It became this: http://sourceforge.net/projects/mikkrocms/
But still, this is not for the normal user. It it more targeted towards programmers. I used it many times as a base to start from, without having to rewrite the same code over and over. It uses TinyMCE which I found to be very very nice.
It is not exactly what I wanted, but still it can do what I wanted anyway, almost.
The idea is that the CMS system's look, and what functions it has depends on how I create my database for it. So for example if I want to be able to create and edit a menu for my website, I want to have a table in my database for that menu. So I just simply create that table, with id, name varchar(255), timestamp, for example...
Then I want to be able to create and manage different pages, and also link them to my menu. So I create the table named "page", with id, name, menu_link and timestamp. The menu_link should be the same type as id in the "menu" table ofcourse.
When I connect MikkroCMS to this database, it will look at the tables in there, and automatically build up the tool for it. You can almost say it does the exact same thing as PHPMyAdmin does, but much more simple. And not to scribbly looking for the user with strange buttons everywhere.
It is also possible to create radio buttons, by naming a position within your table something like "foo_radio_choice1_choice2". MikkroCMS will look at the name of that row and create a radio button in the CMS system with the two choices. This maybe sounds abstract, a visual example is needed.
Later ofcourse, all the programming for the specified website is up to the programmer to create, and the CSS script for the CMS could be shared with the website afterwards to keep the same look and feel. The CMS system is almost already complete when the database has been made, but the website is not. This takes away alot of work if you want to create a CMS system + website.
But also always keep it as simple as possible, so that any newbie could get into it easily. I wanted to take away as much useless information as possible, like edit slugs, features to create categories and other things that only looks too abstract for a new CMS user.
So I got an idea that I wanted to create a CMS for creating CMS systems, but still keep it extremly simple and clean.
It became this: http://sourceforge.net/projects/mikkrocms/
But still, this is not for the normal user. It it more targeted towards programmers. I used it many times as a base to start from, without having to rewrite the same code over and over. It uses TinyMCE which I found to be very very nice.
It is not exactly what I wanted, but still it can do what I wanted anyway, almost.
The idea is that the CMS system's look, and what functions it has depends on how I create my database for it. So for example if I want to be able to create and edit a menu for my website, I want to have a table in my database for that menu. So I just simply create that table, with id, name varchar(255), timestamp, for example...
Then I want to be able to create and manage different pages, and also link them to my menu. So I create the table named "page", with id, name, menu_link and timestamp. The menu_link should be the same type as id in the "menu" table ofcourse.
When I connect MikkroCMS to this database, it will look at the tables in there, and automatically build up the tool for it. You can almost say it does the exact same thing as PHPMyAdmin does, but much more simple. And not to scribbly looking for the user with strange buttons everywhere.
It is also possible to create radio buttons, by naming a position within your table something like "foo_radio_choice1_choice2". MikkroCMS will look at the name of that row and create a radio button in the CMS system with the two choices. This maybe sounds abstract, a visual example is needed.
Later ofcourse, all the programming for the specified website is up to the programmer to create, and the CSS script for the CMS could be shared with the website afterwards to keep the same look and feel. The CMS system is almost already complete when the database has been made, but the website is not. This takes away alot of work if you want to create a CMS system + website.
Thursday, 20 December 2012
Final Fantasy vs Twin Peaks
Final Fantasy games really should go back to this Twin Peaks inspired background music. Listen during the cave scene at 12:10. It's also close to a atmospheric background music that FFVII had. This finger-snapping, jazz style music. That almost defines Final Fantasy for me. This was definitely the best period for FF games.
What a pair of great geniuses Angelo Badalamenti and David Lynch is, that it even inspired the music for two of the best games in the FF series. Because the music in those games really boosts the quality!
I cheated in this video. To be honest it kind of make the game boring when it is too easy to win :)
Here is another song from FFVII that I like.
Aerith's theme also felt somewhat Twin Peaks inspired.
What a pair of great geniuses Angelo Badalamenti and David Lynch is, that it even inspired the music for two of the best games in the FF series. Because the music in those games really boosts the quality!
I cheated in this video. To be honest it kind of make the game boring when it is too easy to win :)
Here is another song from FFVII that I like.
Aerith's theme also felt somewhat Twin Peaks inspired.
Tuesday, 18 December 2012
Thursday, 13 December 2012
Cheating with ZSNES
I had some fun time playing with the cheat feature in ZSNES emulator. What you are basically doing with this feature is to find values in memory and fix them to whatever value you decide. You can do more than just changing numerical values on screen, take a look at what I do with Super Ghouls and Ghosts here for example (Look at 22:26).
In some games you have a state where your character is blinking, usually right after you have been hit by an enemy. It is possible to lock your character in this state and become immortal (almost).
The state is controlled by the value of a variable. It's completly different in every game. But it is possible to find it.
In Super Mario World for example, when you pick up a star there is a counter that counts up or down until it reaches a certain value. And then when the counter has reached this final value your star power is gone. You can find this value with the compare method and fix it to any number, and you will have infinite star.
I also found a way to change my character into flower mode, or other strange unknown modes. But eventually the game crashed.
In some games you have a state where your character is blinking, usually right after you have been hit by an enemy. It is possible to lock your character in this state and become immortal (almost).
The state is controlled by the value of a variable. It's completly different in every game. But it is possible to find it.
In Super Mario World for example, when you pick up a star there is a counter that counts up or down until it reaches a certain value. And then when the counter has reached this final value your star power is gone. You can find this value with the compare method and fix it to any number, and you will have infinite star.
I also found a way to change my character into flower mode, or other strange unknown modes. But eventually the game crashed.
Saturday, 20 October 2012
Generic Assembler
This is an assembler I made for developing my own CPU, I can use this program to define what I want my opcodes to look like and make simple test programs with it. It is not really complete, I cannot use #define for example, but it is supposed to support #define, to use macros like you can in C.
And for some reason opcodes looks like they are shifted one bit to the left. I noticed this when I was recording this video, it was over a month ago I worked on this project so I really don't know why right now. Even though the assembler has this bug the .set file I wrote for DCPU-16 seems to assemble the correct opcodes so I really don't know what happened.
Also opcodes are limited and locked to 16 bits, but that should be configurable in the future, but still the maximum size of an opcode is 64 bits.
Be sure to look at this video in 720p
http://youtu.be/ejKyaFMzhNM?hd=1
You can check out the source code here:
https://github.com/Spekkio/spekkio_asm
And for some reason opcodes looks like they are shifted one bit to the left. I noticed this when I was recording this video, it was over a month ago I worked on this project so I really don't know why right now. Even though the assembler has this bug the .set file I wrote for DCPU-16 seems to assemble the correct opcodes so I really don't know what happened.
Also opcodes are limited and locked to 16 bits, but that should be configurable in the future, but still the maximum size of an opcode is 64 bits.
Be sure to look at this video in 720p
http://youtu.be/ejKyaFMzhNM?hd=1
You can check out the source code here:
https://github.com/Spekkio/spekkio_asm
Wednesday, 3 October 2012
Hide email addresses from email scanners
I have always wondered how spammers can find my email adress. Do they just send mail to random adresses and hope it will arrive. My idea was that there were scanners that search the web and find e-mail adresses on random web sites.
So I wanted to hide the e-mail adress in the HTML code somehow, but still keep the original function of a mailto: link.
Take this simple Javascript.
function mejl(adress) {
window.location = "mailto" + unescape("%3A") + decode(adress);
}
It can be used on a normal link like this:
<a href="javascript:mejl('znkv.sbb@ubzr.fr')">mail me</a>
As you can see there is my e-mail adress encoded using ROT-13, znkv.sbb@ubzr.fr. It also looks like a working e-mail adress. So an e-mail scanner might pick it up and think it is a real adress. The decode() function can be replaced with any de-randomizing function you can come up with yourself. But here's the ROT-13 decoder.
var rot13map;
function rot13init()
{
var map = new Array();
var s = "abcdefghijklmnopqrstuvwxyz";
for (i=0; i<s.length; i++)
map[s.charAt(i)] = s.charAt((i+13)%26);
for (i=0; i<s.length; i++)
map[s.charAt(i).toUpperCase()] = s.charAt((i+13)%26).toUpperCase();
return map;
}
function decode(a)
{
if (!rot13map)
rot13map=rot13init();
s = "";
for (i=0; i<a.length; i++)
{
var b = a.charAt(i);
s += (b>='A' && b<='Z' || b>='a' && b<='z' ? rot13map[b] : b);
}
return s;
}
function mejl(adress) {
window.location = "mailto" + unescape("%3A") + decode(adress);
}
So I wanted to hide the e-mail adress in the HTML code somehow, but still keep the original function of a mailto: link.
Take this simple Javascript.
function mejl(adress) {
window.location = "mailto" + unescape("%3A") + decode(adress);
}
It can be used on a normal link like this:
<a href="javascript:mejl('znkv.sbb@ubzr.fr')">mail me</a>
As you can see there is my e-mail adress encoded using ROT-13, znkv.sbb@ubzr.fr. It also looks like a working e-mail adress. So an e-mail scanner might pick it up and think it is a real adress. The decode() function can be replaced with any de-randomizing function you can come up with yourself. But here's the ROT-13 decoder.
var rot13map;
function rot13init()
{
var map = new Array();
var s = "abcdefghijklmnopqrstuvwxyz";
for (i=0; i<s.length; i++)
map[s.charAt(i)] = s.charAt((i+13)%26);
for (i=0; i<s.length; i++)
map[s.charAt(i).toUpperCase()] = s.charAt((i+13)%26).toUpperCase();
return map;
}
function decode(a)
{
if (!rot13map)
rot13map=rot13init();
s = "";
for (i=0; i<a.length; i++)
{
var b = a.charAt(i);
s += (b>='A' && b<='Z' || b>='a' && b<='z' ? rot13map[b] : b);
}
return s;
}
function mejl(adress) {
window.location = "mailto" + unescape("%3A") + decode(adress);
}
Subscribe to:
Posts (Atom)