Archive for the ‘Quickies’ Category
Internets!
Earlier today, I was reading this Ars Technica article and found it difficult to relate the figure of 250 GB/$250 to what I knew. So I figured it was time to do some statistics of my own!
First of all, a direct comparison isn’t really possible — I’m on a proper unlimited data plan (well, two of them actually), and nobody has ever called me up to ask me about toning down my usage. Similarly, I live in a nice big city of 2.something million residents and that really does translate to good prices solely because it’s cheaper to run Internets to a lot of people in a small area, than to a small number of people in a large area.
But putting all that aside for now and just focusing on the numbers, let’s see how we can quantify my Internet usage:
Cost
We’ll start with the easiest part, determining the cost per month. I have two ISPs: RDS and iLink. The RDS connection costs me 64 RON/month and the iLink one costs 45 RON/month. Converting (and rounding up) to the nearest US Dollar, we get:
RDS: $21 US/mo
iLink: $15 US/mo
Total: $36 US/mo
Usage in the last month
Looking at my pfSense gateway’s statistics, I don’t actually have numbers for the entire previous month, but I’m pretty close. Here are the graphs I saw (click for full-size, if you want):
And here are the interesting numbers in plain text:
RDS: 210.11 GB in + 20.83 GB out = 230.94 GB
iLink: 68.96 GB in + 32.57 GB out = 101.52 GB
Total (rounded up): 230 GB in + 54 GB = 284 GB
Which gives us a ratio of 284 GB / $36 US = almost 8 GB/US$.
When we compare this to just over 1 GB/US$, we come to the conclusion that I would’ve ended up paying 8 times more for the same bandwidth usage, were I unfortunate enough to have Frontier Communications as my ISP.
Now, like I said earlier, it’s not really a fair comparison, in that they’re in a small town and I’m not, but still… a ratio of 1/8th the price?
And some fun
Anyway, while we’re looking at this data, let’s have some fun with it. Using the maximum columns from the two graphs above, we can characterize my two Internet connections (with some crappy approximation):
- RDS: Asymmetrical 20 Mbps/3.5 Mbps, for $21/mo.
- iLink: Symmetrical 10/10 Mbps, for $15/mo.
Is that good? Is that bad? I don’t know. All I know is it’s more bandwidth than I absolutely need (and the averages agree), but since I need both connections for redundancy anyway, why not use them both?
Quick ‘n’ Dirty MySQL Backups
By request, here’s the script I worked up to make periodic database dumps into a directory and gzip them up:
#!/bin/zsh
mysql_user=root
mysql_pass=your-root-password-here
bk_path='/where/to/put/the/dumps'
right_now=`date +"%Y%m%d-h%H"`
bk_fname="${bk_path}/full-db-dump.sql"
bk_gzname="${bk_path}/full-db-dump-${right_now}.sql.gz"
mysqldump -u"$mysql_user" -p"$mysql_pass" --all-databases > "${bk_fname}"
gzip -c "${bk_fname}" > "${bk_gzname}"
Running this as a cron job every [x] hours should be pretty good for small sites, especially if the archive directory is periodically rsynced to another remote host (as in my case).
For serious stuff, you may consider adding MySQL replication for continuous backup.
Oh, and since not everybody uses zsh, you can probably change the hash-bang to point to /bin/sh safely. I haven’t tried it myself, though.
Здравствуйте?
Here’s an interesting quickie: I’ve been getting a bunch (well, four so far, but far more than usual) of comments in Russian, all coming from the same IP that DomainTools says is in Ukraine — apparently, an ISP or something like that.
Now, the comment text, when run through Google Translate, reads pretty innocuous, but the activity smells spammy; and I can’t read Russian anyway, so I don’t want to approve what I don’t understand, either.
To the commenter(s) in question: I have only a slight idea of what you posted. I would prefer comments in English, or Romanian (if you speak that one). French is also an acceptable alternative. I’ll even try Spanish.
And if it’s spam, please just don’t bother — it’s useless!
Rainbowz Out My Window!
Just took these pictures outside my window an hour or so ago:
UPDATE: I took a bunch of photos from the set and managed to make a panoramic pic:
Silly Google Phrases
Every blogger has done a post like this. You know them, you love them, they are… the silly Google search queries people use to find your blog!
These are in reverse order of arrival, and the URLs are mostly pasted straight out of the referrer log. Without further ado:
- narc ftp port (Google UK) — I’m not sure I really want to know. Do I have an FTP daemon I’m not aware of? If so, it’s probably stuck inside the LAN, since I’m not forwarding anything unexpected.
- what a narc does to set up people — Did you really think it would be that easy? Us narcs have our professional pride, you know?
- acronym for narcs (Google Australia) — Do we really need an acronym here? “Narc” is a pretty short word already. What would be the acronym? “N”?
- zap+ro (Google Thailand) — I’d really prefer if you didn’t, thank you. I happen to live here in .ro, and I like it.
- pl poke data narc (Google UK) — Er… I don’t think I really want to know what that’s supposed to mean. Using Perl to poke data into my brain? No, thank you. Although, if you manage it, that’ll be a neat hack.
- short summary of the notebook — Before I did that search, I hadn’t known The Notebook (2004) was a movie (and a novel, apparently). So here’s a short summary, then: “It’s a movie (and a book).” Happy?
- why is vodafone website so shit? (Google UK) — Good question! Without knowing anything about their internal organization, I’d guess that most of it was their use of a very crappy technology (JavaServer Pages? That’s what the JSP stands for, yes?), which presumably was chosen because the rest weren’t Enterprise-y enough and/or because that’s what the consultants they hired to do the job “knew”.
- mysql “add a fucking user” — This search actually returns a very specific result from my blog, that being my “Going Insane From Work” post, which unfortunately, doesn’t actually answer the (implied) question. So, here it is: to “add a fucking user” to mysql, the command is: GRANT <privileges> ON <database>.<table> TO '<username>'@'<host>' [IDENTIFIED BY '<password>]. Alternatively, to leave the user at default privileges (that is, none), use: CREATE USER '<username>'@'<host> [IDENTIFIED BY '<password>']. This, and more, can be found in the fucking MySQL manual, which you should’ve picked up like the rest of us do.
- arguments against alcoholics anonymous — Er… why? Oh! Oh! I got one: “I’m not a drunk, I can quit whenever I like!” There’s your argument.
- Finally, i didn’t know my friend was a narc — Well, neither did I. Which poses an interesting question: if neither of us knew, are you really my friend?
That’s it for this edition of “Silly Google Phrases”. One thing I’d like to mention, though — a lot of people have been finding my website by searching google for… narc.ro. I find this very curious, but ultimately, as long as people find what they’re looking for, who am I to judge?
Thank you all, and good night!
…And we’re back up
The toughest parts proved to be:
- Finding an optical drive that worked (I found one… from 1998 (!))
- Getting everything (postfix, apache, mysql) migrated
Total downtime was about six hours or so. The final result is excellent.
Now if you’ll excuse me, I need to get some sleep
Update: Wait one goddamned minute, I just noticed my permalinks aren’t! Valid, that is — they 404. Bah, I have to fix this…
Update to the update: Yeah, that worked. mod_rewrite wasn’t enabled. Oops. Wonder what other modules I’m missing.
OK, Down We Go… [pre-planned downtime]
As announced, I’m starting the setup for some downtime, with intent to switch my mail/web server to Ubuntu Server edition. It will still take some time to get everything set up (backups in place, etc), so this post should reach RSS readers (including the Google Feedreader), but at some point there will be downtime. If all goes well, it shouldn’t take too long. Wish me luck!
My Anti-Spam Solution
I rely on a very simple technique for anti-spam — I sign up to new websites using throwaway email addresses (usually, “narc-domain.tld [at] narc.ro”, or something like that), and if an address starts getting spam, I try to notify the interested parties, or, failing that, I blacklist it altogether.
So far, this has been very successful, in that the only spam I ever get tends to come from addresses I posted publicly, like an idiot, on this very website. To address this problem, I’ve set up a very simple contact form to get straight to me instead, and am now blacklisting all three (haha!) addresses I posted publicly in the past.
If you want to help, for whatever reason, I wouldn’t mind being notified about any mailto: links left anywhere on www.narc.ro or its sub-sites. I think I’ve killed them all, but I could very well be wrong. If you actually do this, I’ll buy you a beer the next time I see you. Or your favorite soft drink, if you’re not a drinker
Spam Break?
Apparently, spammers’ botnets didn’t work very hard over this holiday season — I only got two spam emails between the 25th and today. Quite interesting.


