This might me useful for some people…
If you want to echo the value of the next ‘key->value pair’ in an associative array. You can use:
$keys = array_keys($arr);
echo $arr[$keys[(array_search($key, $keys)+1)]];
Where $arr is the associative array, $keys is the $arr keys as values with numerical keys and $key is the $arr key of the key->value pair prior to the one you want to output.
$arr = array(
'12' => 'a',
'14' => 'b',
'20' => 'c',
'23' => 'd'
And you want to output the next value after ’14’=>’b’, which would be ‘c’. All you need to do is define $key = 14;
If you want to output the previous to ’14’=>’b’, just change the “+” to a “-“.
Recently I’ve been using ST2 on my new all-Linux setup, with the SFTP plugin of course…
However, I did come across some issues with certain file types not conforming to the predefined settings for no word wrapping.
Simply changing the ‘line break column number’ (have forgotten the actual variable name and I’m not at a computer ATM) to something large such as “9999”, seems to be an affective work around for now.
Due to some poor planning on behalf of Micro$haft, Skype 4 64bit support (the current version at the time of posting) for Debian 6 64bit and many derivatives such as CrunchBang 10 64bit has been screwed up. Skype should work in Debian 7 64bit and CrunchBang 11 64bit.
After some frustration and terminal-error output-monitoring. I’ve come up with a Skype 220.127.116.11 package that does work on Debian 6 64bit etc.
Using some documentation found on the Skype site and other forums, I’ve built this package by overwriting some files with newer/older/different versions and a few file renames.
You can see my progress and disrepair over at the CrunchBang forums, http://crunchbang.org/forums/viewtopic.php?id=23279.
You can download my Skype package (h0zza mod) here: http://pirateswizardsandpenguins.com/downloads/skype-18.104.22.168_h0zza.tar.gz
Extract the archive to a folder called “bin” in your home directory. e.g. “/home/username/bin/skype-22.214.171.124”. You can then run Skype 126.96.36.199 by entering this, into a terminal.
It should work just fine, however only use “user generated” packages (like this one) as a last resort. In my case there was no other option.
As usual, I’m not responsible if your computer die’s, related or unrelated to this package! They call it CrunchBang for a reason! 😛 (It really should be fine, just covering my ass.)
I really wish there was a good alternative to Skype.
Yet again, adding an IP blocklist to Transmission Bit Torrent Client has become even more obscure.
Currently the only way to add an IP blocklist without using external programs is by manually editing the programs config files. This is possible on all OS’s that Transmission supports, however the file paths I’ll be using in this post are for Linux, other than file locations, everything else should be universal.
The config file can be located at:
Continue reading “Transmission IP Blocklist…”
As many of you may know, hozzamedia works closely with a few safety and health organisations. And paradoxically, recently due to the extraordinarily huge work load, I can quite firmly deduce my health has suffered… 😛
But when your cooped up in doors for days on end with no sun or outside influence, how can you stay healthy and work as a coffee guzzling, dark loving, flickering-screen, programming junky?
The answer is simply maintaining a healthy environment, with a few small, seemingly obvious tricks.
- Ventilation – Open the Damn windows and put on a jumper.
- Cook – Spend some time and make your own food.
The first two are simple enough but the third may as well be Goa’uld technology to me and others the-same.
Continue reading “Agriculture in the City…”
A very good and loved friend of hozzamedia (even since the early days). Has finally moved his talents of App Reviewing and Media over to the amazing world of Blogging!
Go check him out as we love Lewis and his content is genuinely bloody interesting! Well worth the read.
Some of my favourite articles at the time of writing this:
It’s always nice to know that real people actually read this blog! 😀 (as I get few comments and thousands of hits! :P)
Mark, over at iPaintCode.com has added the hozzamedia SeeStyle or SSS Coda 2 theme to his theme list/archive!
Continue reading “[Recognition!] IDE Code Styles :D”