Simply create a trigger which will insert unsubscribed users in the blacklist after every update on the subscriber table.
SELECT emailaddress, ‘g’, UNIX_TIMESTAMP( )
WHERE unsubscribed != ‘0’;
If you want to insert a sleep in a script for a random number of seconds, you can do the following:
NUMBER=$[ ( $RANDOM % 60 ) + 1 ]
Replace 60 with the interval chosen and you will get a random sleep between 1 and 60 seconds.
This can be useful if you are trying to fetch data from a server who’s monitoring the number of connections you are opening and tends to blacklist you if you do too much.
You need to execute this as root.
First enable SysRq feature in the kernel
echo “1” > /proc/sys/kernel/sysrq
Then crash the kernel (makes a kernel dump)
echo c > /proc/sysrq-trigger
Reboot with no conditions (no disk unmount, just like pressing reset button)
echo b > /proc/sysrq-trigger
Shutdown all the processes gracefully except init
echo e > /proc/sysrq-trigger
Kill all the process brutally except init
echo i > /proc/sysrq-trigger
There is one very simple way to take your elearning module to the next level. Recording.
Recording almost like a pro means, several things:
– the right voice
– no noise
– the right pace
For the right pace, there is a lot to say but that is not the topic today. What I want is to give you a couple of tips you will find useful to create quality recording on the cheap.
– the right voice
Some people say I sound very well when I record myself. Truthfully I started to think so when people said it. I would have never started recording myself if nobody else would think my voice is good for recording.
I think most people can record themselve. I don’t think there is a bad voice and a good voice. It’s a matter of how you articulate, the noise, the technique. Not the texture of the voice. So if you sound like a screeching bird, keep faith, there is hope!
– no noise
That’s where there is usually room for improvment.
First, you really need a good microphone. I bought a Samson Meteor mic. It’s awesome. I just have one problem with it, the first time I showed it to my colleagues, they were wondering what I was doing with a dildo…
The sound of this mic is just fantastic and it costed me 100 euros.
When you are recording yourself you may have to hit the keyboard, if you do a screencast, you may have to click, etc. These little noise can be captured by the mic and it may even be necessary to give a sense of reality to your performance, but it can also create loud banging noise every time you hit a key.
So here a little piece of advise. Find another table and put the mic there. Or find something like a laptop pouch, a backpack, whatever soft and big you may have and put the mic on it.
That’s my setup and it works. You can also put a pullover under, a coat or whatever you have close by.
Also make sure the CPU fan is not blowing directly towards the mic. That would mean more noise to get rid off in post production.
– Microphone orientation
One of the most annoying thing in amateur audio recording is Ps and Bs popping. Some people will sell you expensive screens to prevent them Some other people will teach how to make one yourself. But the true real way to get rid of them without investing anything is to setup your mic properly.
Just make it point upwards and don’t speak directly towards it. Direct your speech slightly to the side of it. that way you will not create bursts of air
Today I had to forward 2200 emails from a mailbox to another address. I looked around a bit to find a way to automate this process but all I could find was how to forward new messages.
That’s easy, just put a .forward file in your home dir with the email where you want to forward and it works.
But to forward already received email, it’s a bit trickier.
I was already using Mutt and I know it is a very powerful tool so I looked a bit more into it.
In order to solve my problem I found the following:
You can Tag many messages with this command:
Then execute one command on all the message tagged with this:
It will then ask you the email address where to bounce all this emails.
Fill it in and off you go. It took 3 minutes to send the 2200 mails. Cool 🙂
Then you can easily delete all these files with this:
I just installed moodle on my server and got into a big mysql error complaining about binlog and other stuffs…
Cannot execute statement: impossible to write to binary log since
BINLOG_FORMAT = STATEMENT and at least one table uses a storage engine
limited to row-based logging. InnoDB is limited to row-logging when
transaction isolation level is READ COMMITTED or READ UNCOMMITTED
After a bit of googling and understand what this was about I figured I should add the following in my my.cnf file and then restart mysql.
Here is a great python script very useful to download an HD video from Youtube using the command line in Linux.
It’s very simple, download and run. The result is an mp4 file that you can watch offline with VLC or Media Player Classsic under Windows or any other mp4 player under Linux.
I finally decided to create my company (Bonne Idée: bonneidee.biz) and do something with it. I am now involved in two projects.
Yaentrainement is an online sport team management platform which is having a huge success in Finland (170K+ users and 43M sign-ups as of may 2012).
With Ubuntu 10.04 came a new version of Grub. During an upgrade from a previous version to 10.04 or higher there will be a time when the system will ask you if you want to keep your own version of the configuration or get the package maintener version.
If I am not mistaken, you should say you want the maintener one.
But then something strange may happen depending on your upgrade path.