Idiot proof setup for persistent reverse shells / port forwards (same thing) under a Ubuntu VM remote and my Dreamhost server, but should apply to nearly* all *nix’s
Posts Tagged: code
26
Oct 11
Unicode Characters in Mendeley Bibliography Breaking Latex?
I use Mendeley for my reference and citation management.
I use TexClipse for (most) of my editing, ViM otherwise.
I use Xelatex / pdflatex for project building.
These don’t always work so well together. Continue reading →
31
May 10
Automagic Kernel Cleaning under Ubuntu
Sick of having dozens of old kernels sitting under your /boot/ dir? Want a simpler boot-life? Well we’ve got the solution for you. Continue reading →
17
Apr 10
Add a Twitter @anywhere hovercard to links containing tweeps
Everyone and their dog has a walkthrough of adding @anywhere hovercards to your blog. But the default has a small failing that irked me when I was re-doing my Blogroll (check them out, they’re all great! I promise!), and that was that if you take a tweep, like @god for example, it’ll happily wrap the hovercard around it, but if you have a link to this great status that @god posted, @anywhere won’t pick this @god up.
9
Apr 10
Listing just dot-files
Its a problem that I’ve come across, and I’m not the only one, so heres what works for me to find those pesky files that start with a .
ls -a | egrep -i "^\."
This only works in the current working directory, which is the normal usage.
FYI the reason that this is problematic is that the ‘.’ symbol is a single character wildcard; most people are familiar with the asterisk ’*’ indicating ‘anything, however long’, whereas the ‘.’ means ‘any single character’.
The command works by looking only at the first character of the file (‘^’, thats called a caret) and then removing the special meaning of ‘.’ by escaping it with the slash.
Update:18/4/10
@stevebiscuit correctly pointed out that the -i flag is unnecessary.
-iinstructs egrep to ignore the case of any matches, so that ‘HeLlO’ matches if you egrep -i for ‘hello’. Since there is no case for the ‘.’ symbol, the -i is pointless.
1
Apr 10
Mod_Rewrite in Apache2
Just incase you forget how to fix this the easy way: Enable mod_rewrite for URL voodoo; (Or any module replacing the
rewrite
)
$sudo a2enmod rewrite $sudo service apache2 restart
Remember to fiddle with
/etc/apache2/sites-available.*< \pre> and change "AllowOverride none" to "all" in any places that you're having trouble with rewritten URL's
14
Mar 10
Installing and Configuring NS-3 on a Ubuntu System
NS-3 Appears to have a staggeringly steep learning curve so I hope these posts help out someone else (or me, when i forget all this in a month).
13
Mar 10
Mercurial Quick Start Cheatsheet
I hadn’t used Mercurial before so I thought it might be a good idea to leave a reminder for me and anyone else who comes across it…
For tidyness, I do all of my dev-stuff (Subversion, Mercurial, CVS, Git etc) under ~/src and only take root privileges when its needed; any good makefile should relocate the necessary files for you at the ‘make install’ or equivalent point.
Update:This article was picked up by the guys at DevCheatSheet.com and I’m really honoured to be included in a site that I’ve been dipping into over the years, so if you need any kind of cheat sheet or quick reference, I highly recommend checking them out. Anyway…




12
Feb 11
Bolsters Code-Related Rants (An ongoing collection)
FFFFFFUUUUUUUU
hg add $filenamebefore updating or committing, otherwise noone has any idea whats going on. Ditto removals of files, itshg remove $filename ; rm $filename, not the other way around.You guys got any to add? I’ll be adding to this as I think of them… / come across them…