Quick Tips XFCE

Quick Tip – Mouse Scrolling in XFCE

Hey guys, another quick tip! So was just getting annoyed about my mouse scrolling being odd – I had natural scrolling set in my main XFCE settings, however it did not behave the same for everything. In a random google session, I found out that theres a lower level setting for it. So, heres the instructions I ran – you’l have to modify them for your specific needs though! as your mouse may not have the same name. You will also need to disable natural scrolling in XFCE to make it work properly!

sudo apt-get install xinput
xinput --list
xinput --list-props "PixArt USB Optical Mouse"
xinput set-prop "PixArt USB Optical Mouse" "Evdev Scrolling Distance" -1 1 1

So theres another random quick tip!

Postgres Quick Tips

Quick Tip – Postgres Data Dumping

Hey guys, just a quick tip on something I used recently – how to dump data to CSV from postgres.

So, if you want to dump something on the server itself, you can run the following commands:

Copy (Select * From foo) To '/tmp/test.csv' With CSV DELIMITER ',';

Which will dump out the data into a CSV at the specified path. If you are logging in through a remote connection on a client, then you can do the same using a similar command:

\copy (Select * From foo) To '/tmp/test.csv' With CSV

This will then dump out locally to your client.

On both of these commands, the file will be written with the permissions of the item in question – with the first one, it will be written as the user which the server is running under (usually postgres) – in the second one it will be as whoever you ran psql as.

This was pulled from a stackoverflow answer, so go upvote them, its a very good answer and is very well written – much better than I have managed here.


Its been a while…

Hey guys, so yea its been a little bit of a while – at least since August when I posted part one of getting started with Gulp. Yes, there is a part 2, however I have been really busy with work and just not having the incentive to do more on it in my spare time.

So, what have I been up to? Well a lot of stuff at work, doing some large migration items between several database systems as well as doing a full deployment system for clients. That is as well as helping to run a fledgeling hackspace, which is doing surprisingly well considering its in its second year (infact our second AGM is next week!). Apart from that, Ive been trying to do some work on making videos on youtube, and learning how to record and edit things – and then there are the conferences!

Was at FOSDEM again this year, which was great, especially seeing everyone again. I helped with the Perl room, and did a secondary set of videos which should be uploaded at some point soon. These will be a secondary set of recordings for the talks, as last year there were a few recording issues from the official FOSDEM team – they should be more ironed out this year, so we will see when they get released! (I had to help fix the official ones last year as well..)

The next major conference for me is FlossUK, of UKUUG for those old ones in the audience, where I will be talking on Lets Encrypt, or more precisely a set of scripts I created specifically to make managing the SSL certificates I use on this server easier, and also on some Perl modules i’ve been working on for making testing with external software, which need running instances to run. The first of these is Test::Instance::Apache, and eventually I will be creating an nginx, Postgres, and MySQL set of modules with a similar interface – as well as anything else I run in to and need to test either in day to day work, or just feel like making work.

Apart from that though, theres not much else. Ive been playing games both online and on pen and paper, as well as playing around on my new laptop recently – an Asus UX305CA which is meaning I can write and work on minor things almost anywhere without worrying about running out of battery as quickly – as well as not letting me play (many) games on it, as its just a small m3 processor. I may actually do a full write up on this machine at some point, as its a rather nice little light thing.

I think thats about it for now – I will post more here in the future on various things, as they happen. I would love to try and write more, especially tutorials – if you want me to try and write a tutorial on something (especially if its outside my normal work area!) then please leave a comment or contact me at the various other places you can find listed on this site.