Stick this in your .bash_profile or .bashrc file:
function diffopen() { git diff --name-only "$1" | xargs -d '\n' pstorm; }
Then in your project folder, say you want to open all files that differ from your master branch:
diffopen master
Note, on OSX you’ll need the GNU version of xargs for this to work, as I discovered the hard way..
This post is mostly for my own reference. I’m still in the very early stages of understanding and using docker.
# The docker cli client app brew install docker # Tool for installing a docker machine (VM and or docker layer for holding containers (the whale)) brew install docker-machine # Create a local docker machine using virtualbox as the VM, call it 'dev' # Assuming this is where it gets clever as we can create docker machines for reference locally way off in the cloud docker-machine create --driver virtualbox dev # Nothing worked properly until I did this, not sure what it actually does, probably sets the active docker environment eval "$(docker-machine env dev)" # Pull down and register the whalesay container docker pull docker/whalesay # Run the cowsay command on the whalesay container with the argument 'boo' docker run docker/whalesay cowsay boo
If you’re not already familiar with the heartbleed bug, have a look at this website: http://heartbleed.com/ - I don’t want to talk about what it is exactly as lots of people have done that.. just why you should be more worried than you are.
If you were (or still are?!) running an affected version of openssl:
You almost certainly have NO way of telling whether someone attacked your server You may have been attacked through any service using SSL.
We recently took on a horrible code base at work, with lots of open tags in the code like this:
<? calculateVat(123.. As far as I know this way of opening PHP code is deprecated and soon won’t be supported at all so I thought I’d just use sed to fix this but it wasn’t quite that simple.
Sed has no way of doing look-aheads with regular expressions meaning we can’t tell it to not turn <?
This article was originally written in 2013 and applies to a fairly old model of the WD Mybook Live. The procedure here may well not work for you, please just use it for ideas. Also, check the comments as a lot of other people have tips!
When the WD Mybook Live 3TB NAS was released, I went out and bought one and promptly put all my stuff on it. I have never kept anything *really* important on there as I didn’t have anything to back up all that data on to.
For about a year I noticed that very infrequently my VPS would run out of memory.. at first I thought it was probably just a wordpress plugin, but after a while I discovered it was actually saslauthd. This is a known bug (not known very well though..) with saslauthd on Debian. Anyway, here’s the fix - I’m not totally sure of the implications, so if you run a busy mail server I’d recommend you look into it a bit more before doing it:
Recently I’ve started having to work with sites hosted on shared hosting with phpMyAdmin and a measly 2MB upload limit for database imports. To get around this issue, I found a great little tool called bigdump which can just import a mysqldump file (even if gzipped) - just upload via ftp and import! Pretty sweet.
http://www.ozerov.de/bigdump.php
I recently upgraded from a WDTV media player to a WDTV Live. The WDTV is just a simple set top box that allows you to play video on your tv, much like an xbox 360 and a whole bunch of other devices. The WDTV live allows you to play stuff over the network which opens up a whole host of cool stuff if you use the mediatomb DLNA server software available for linux (google tversity if you want something similar for windows.
Ok, so I decided to natively install Ubuntu 10.04 on my Studio 1555.. fairly impressed.. almost everything works out the box which is a bit annoying.
The only issue I’ve had is that the included proprietary ATI driver fails when you try to use suspend, however this is apparently easily circumvented by using the most recent driver from the ATI site (it was a bug with their driver.)
Using the open source driver results in poor power management, so I’d advise against doing that.
Trac is pretty easy to set up on Debian, here’s a mini guide of what I did to get it working nice and quick. You’ll probably want to configure users etc afterwards, but this should be enough to get going.
Install: apt-get install trac libapache2-mod-wsgi
Initiate the trac environment: trac-admin /var/www/srdev/trac/ initenv
Set permissions: chown -R www-data /var/www/srdev/trac/
Install the wsgi script and web resources. The first argument before ‘deploy’ should match the install environment (the path above.