I recently found a 2 hour YouTube video where I wanted to listen to the audio only. On trying to install youtube-dl on my server, I was shocked to see the number of packages that it was trying to install.
I run Ubuntu, but this should work in any Linux distro. Using a docker container saves polluting your server with a lot of dependencies you might not need.
If you don’t already have it, install docker:
# curl -fsSL get.docker.com -o get-docker.sh
# sh ./get-docker.sh
The following will download a video to the current working directory:
# docker run --rm -v $PWD:/downloads wernight/youtube-dl "https://www.youtube.com/watch?v=id-here
This will extract just the audio and give you the output as an mp3:
I recently had to code a REST call to a service I could only access behind a SOCK5 proxy. Unfortunately, the hostname of the service wasn’t publicly resolvable so the DNS had to be resolved on the other side of the proxy. Whilst this is pobbible in cURL itself by using the CURLOPT_PROXYTYPE option and setting it to CURLPROXY_SOCKS5_HOSTNAME or by using the flag –socks5-hostname – the constant isn’t available within PHP. This feature was requested in https://bugs.php.net/bug.php?id=65469 however hasn’t yet been implemented. This can simply be worked around by setting the proxy type to 7. The code below shows an example of doing this using the Httpful library, however if you were using curl natively you’d just use curl_setopt()
This was originally 2 years ago with references to the product and vendor. Unfortunately I got threatening legal letters, and almost lost my job! I’ve now stripped out the vendors references and am putting it up simply because I think others will find my methodologies and write up interesting.
There seems to be a lot of confusion in the IRC channel about how to install the guest tools on linux – with a lot of people recommending that you install the tools via the tools installer and the script. I really don’t like to do things this way – as I believe things should be installed using the package manager, and creating .debs of the tools means you don’t need to install a compiler on all of your guests.
I am finally starting to dive into symfony 2 properly. Yes – it’s taken a while, work has taken me in different directions! I found myself needing to create a custom form field type pretty quickly, but couldn’t find much in the way of documentation to do so, so I thought I’ld throw it up here; partly to help others, but mostly to get feedback to make sure I’m not approaching this from the wrong angle.
After my last post, ‘Installing VMware ESXi via PXE’, I found that I needed to do a little customisation of the kickstart script on a per host basis. This post shows how I went about that, with a simple hack to aquire the MAC address and then customise the script based on that. This is a very simple example, but you could modify this easily for your needs. Notice I have two MACs per host below, this is because the machines could PXE over either of their 2 interfaces.
We’re going down the route of virtualising our infrastructure at Timico, which means I’m having to get my hands dirty with VMWare. We’ve tried the Xen route, and not really got on with it – so it’s time to move on to something a little more polished.
In this article, I’ll outline how I plan on speeding up the provisioning of new tin to run as VM machines. The plan is to be able to plug in a new node whenever one is needed, and have it fully auto-provisioned from start to end. The first step in doing that is to automate the installation of vmware ESXi – which is done by PXE booting.
I wanted to find a way to make it easier to see when people came online with Bitlbee and Irssi. I already use a split screen with hilightwin.pl so that privmsgs and highlighted messages appear in a window at the top, so I wanted to find a way of using that.