diff files across servers
Here's another really handy one liner for diff-ing files across servers using process substitution. This seems to work in zsh and bash.
diff /a/file/ <(ssh anotherserver 'cat /a/file/')
Continue reading
Here's another really handy one liner for diff-ing files across servers using process substitution. This seems to work in zsh and bash.
diff /a/file/ <(ssh anotherserver 'cat /a/file/')
I recently needed to check that no files had been modified since I last made an archive of a certain directory. Here's a good one for getting a list of files by last modified date, newest at the top.
find . -type f -printf "%TY-%Tm-%Td %TT %pn\\n" | sort …
Posted on Tue 24 August 2010 in misc • Tagged with RHEL, tmux
Rather than moving to the beginning of a line and the end of a line, ctrl-a and ctrl-b were just print ^A and ^B to the screen. Not sure why, I don't really have time to investigate, but this seems to fix the issue when run within the tmux session …
I'm not really a fan of MySQL but here is a simple problem I always forget the syntax for which is really a SQL issue.
An installation of MediaWiki has an update script which requires the DROP privilege on the database, so I wanted to add the DROP privilege, run …
Today I had a problem where the office firewall would not let out traffic to the fibs.com server on port 4321 (Shame on them!)
Luckerly a remote machine comes in handy. I then just tell my Fibs client to connect on localhost port 4444
ssh -f -L 4444:fibs …
This took me a while to work out why this would not work. When using the -i option with sed you need to specify a backup extension to be used (at least on my 10.5 mac you do!)
e.g.
sed -i '' -e 's/something/something else/g' -e …
I never really feel like i'm any good at using Python unless I am doing cool things with List Comprehension.
Here's a quick example of nested list comprehension I used today to create a new list from a list containing lists of three items
Visually:-
[['mostly cloudy (day)', 'cloudy3.png …Ok, so you can't use samba with Xbox360 and there is no-way I am gonna use Windows. Luckerly, after some dedicated google-ing I came across 2 solutions, both of which did work, but at present the uShare seems to be the tidiest.
http://netou.co.uk/?p=28 Tested on …
A google for xbox live firewall ports never gave me specific ports requirements so here they are as I have discovered them.
Inbound
(A Nat based router/firewall these will need direct port forwarding. On my Juniper I set up a VIP.)
88 UDP
3074 UDP
3074 TCP
Outbound
(I …
Having ended up almost solely with Python at the end of a journey of many languages I have learnt and used; style has been something important to me.
Python has pep8 which states something's definitively such as:-