Arbitrary tweets made by TheGingerDog up to 24 May 2015
Continue reading “Automated twitter compilation up to 24 May 2015”
Linux, PHP, geeky stuff … boring man.
Arbitrary tweets made by TheGingerDog up to 24 May 2015
Continue reading “Automated twitter compilation up to 24 May 2015”
I think the spammers need some help with their regular expressions….
Historically I’ve used $RANDOM as a random number source in bash — a bit like :
RAND=$(( $RANDOM % 10 ))
when I’ve needed a random number out of 0,1,2,3,4,5,6,7,8 and 9
one problem with this is that $RANDOM itself is populated between 0 and 32767 by the shell – so it’s not going to give totally even distribution.
Finally, I discovered ‘shuf’ — usage like :
shuf -i 1-100 -n 1
-i RangeFrom-RangeTo
-n how many
So –
RAND=$(( shuf -i 1-10 -n 1))
Arbitrary tweets made by TheGingerDog up to 17 May 2015
Continue reading “Automated twitter compilation up to 17 May 2015”
Arbitrary tweets made by TheGingerDog up to 10 May 2015
Continue reading “Automated twitter compilation up to 10 May 2015”
Arbitrary tweets made by TheGingerDog up to 03 May 2015
Continue reading “Automated twitter compilation up to 03 May 2015”
WordPress seems to like hiding a load of ‘transient’ (cacheable) stuff in it’s wp_options table. Unfortunately for one site, it seems it didn’t bother to clean up the transient stuff, leaving behind about 750,000 records… which made a WP version upgrade painful, as MySQL locks the wp_option table which causes all other page loads to get stuck waiting (and the site to stop working).
Fix / hacky solution after the ‘more’…
Continue reading “Cleaning up a lot of WordPress _transients”
Arbitrary tweets made by TheGingerDog up to 26 April 2015
Continue reading “Automated twitter compilation up to 26 April 2015”
Arbitrary tweets made by TheGingerDog up to 19 April 2015
Continue reading “Automated twitter compilation up to 19 April 2015”
Arbitrary tweets made by TheGingerDog up to 12 April 2015
Continue reading “Automated twitter compilation up to 12 April 2015”