Well it’s a long time since I last postet something here. Sadly i’ve been very busy with work and afterwards just coded for about an hour before going to sleep.

So what’s going on you might ask. Ive startet a rewrite of an unfinished project called AMVScore back then. The project startet because a friend of mine who hosts the AMV Contest and at some allowed the people watching in the big concert hall to vote for the vid via Twitter. This became quite popular and it became quite much a pain (at least that’s what you might guess when you speak to him) to count all those votes. After the last convention I simply told him I will write him a tool which will pull the tweets from twitter and processes them. I hacked something together in about 3 days after the convention which would work well enough but never got to a stage where I really would count on it since I always wanted to rewrite it in Yii2 for a learning purpose. So i posponed the developement until a final release of my favorite php framework. And here it is. It’s now called TwitterContestScore since it can be used for any kind of voting contest on Twitter. It’s nowhere near finished since I’m developing this on a more or less daily basis after work, but I will most definitely finish it until before the next convention.

Because this whole thing is a yii2 learning project for me I will try to post „nice to know“ bits and pieces and I hope you will like it.

 

WORK IN PROGRESS

Well it’s time again to setup a new hosting box and as time goes by I’m goint to try out something new again. So up until now it was set into stone that I would use Debian as the OS but I got more and more fed up with old and outdated packages/versions. I looked for alternatives and well I ended up choosing freebsd over ubuntu server and centos because of ZFS!! ZFS is the server filesystem to rule em all!!! I won’t go into the details why but if you’re interested I greatly suggest taking a look. Freebsd 10 makes it fairly easy to setup the system with zfs as root file system. Well next will be installing a admin panel to make hosting some websites easier. So this tutorial is about setting up a webstack with:

so lets start!

Install all our needed packages

(I use pkg-ng for this)

okay now edit /etc/rc.conf and add the following

then copy the php.ini to the correct location with

a quick look with „ps -faux“ show’s that php-fpm is running fine… good so faar

MySQL

disable the strict mode since froxlor doesen’t work with that one yet 🙁

now start up our mysql server

now change the password for the MySQL root user

Nginx

open up in your favorit editor

and put the following in it

Now create the missing directories

now create the nginx config for the panel

and insert

if you get a

Don’t worry, that’s normal since nginx wasn’t started yet and the directory wasn’t created yet =) but our’s syntax is ok so all is good! ok let’s get us some admin panel!

now restart php-fpm and nginx and hope we didn’t fuck up something :O

Browse to your froxlor installation and if everything went fine you should see the Froxlor webpage! Proceed with the Froxlor installation as asked! After the successful install let’s configure the panel since I don’t like the default path froxlor uses and to adhere FreeBSD convention user installed stuff should be placed in /usr/local/

Now Login to the admin panel and navigate to

and set the Home directory to

hit save and then open up

Change Webserver vHost configuration file/dirname to

Webserver diroptions configuration file/dirname to

Webserver htpasswd dirname to

Logfiles directory to

Webserver reload command to

Path to fastcgi_params file to

again, save the settings. If you wan’t to enable SSL then you should set Configure the allowed SSL ciphers to

and get yourself a valid SSL certificate (I recommend StartSSL) which provides them for free. Next step is configuring pfp-fpm and to do this enable php-fpm in the Setting panel, hit save and then klick on Settings to the right of php-fpm Configuration directory of php-fpm

Configuration Alias-directory of php-fpm

Temp directory

Global PEAR directories

FastCGI IPC directory

php-fpm restart command

Process manager control (pm)

The number of child processes

The number of child processes created on startup

The desired minimum number of idle server processes

The desired maximum number of idle server processes

Requests per child before respawning

Configure fpm to actually load the config files from Froxlor

open up

and put the pollowing at the end of the file

 

Postfix & Dovecot

 

Well as I’ve recently found out again Akismet of WordPress works quite well and on many occasions too well. It blocked many comments which should have been allowed.

I apologize for everyone I missed or who got blocked since I’m a total lazy man but i found a solution which should work better in the future.

As for you guys out there with a similar problem there’s a nice solution. It’s called Conditional Captcha it show’s a capcha if a comment is flagged by Akismet an then depending on your plugin configuration allows it or not.

I hope I won’t miss so many comments anymore with this but well we will see how it works out =)

 

EDIT: Switched over to the great Disqus plugin which is just awesome!

 

Oh and for you seo guys out there stop it. I won’t perform seo optimization whatsoever since it just way to much hastle … and in the end I just don’t care.

 

I had a very basic problem while coding on a project and it was simply bulkinsert from a .NET DataTable to the MySQL Server and do this FAST! After crawling the net for a while I came to the conclusion that every one of those methods where either slow or didn’t fit my needs so I hacked together my own Solution!

Tested this within my application. Took around 3 seconds for ~30K rows with this!! Not beatable by anything i’ve found :O

there you go, I hope this helps some ppl out there!

 

Edit: some polishing 😉