Apr 21, 2011

UNIX dig command, basic info

I recently became familiarized with  dig or domain information groper, or in short it is the outstanding tool for DNS lookups. It has great functionally ant it is preinstalled on most of the distributions today.If we don't tell it to query a specific name server, dig will try each of the servers listed in /etc/resolv.conf.

The command goes something like this:

dig [ @server ] [ -b address ] [ -c class ] [ -f filename ] [ -k filename ] [ -p port# ] [ -t type ] [ -x addr ] [ -y name:key ] [ name ] [ type ] [ class ] [ queryopt... ]
dig [ -h ]
dig [ global-queryopt... ] [ query... ]


Or why I use dig mostly for. Let say I want to see all the redirects from the top level ns to my server.

 dig mitemitreski.com +trace

and we get something like this:

; <<>> DiG 9.7.1-P2 <<>> mitemitreski.com +trace
;; global options: +cmd
.   46703 IN NS b.root-servers.net.
.   46703 IN NS k.root-servers.net.
.   46703 IN NS c.root-servers.net.
.   46703 IN NS e.root-servers.net.
.   46703 IN NS i.root-servers.net.
.   46703 IN NS g.root-servers.net.
.   46703 IN NS f.root-servers.net.
.   46703 IN NS d.root-servers.net.
.   46703 IN NS l.root-servers.net.
.   46703 IN NS a.root-servers.net.
.   46703 IN NS j.root-servers.net.
.   46703 IN NS h.root-servers.net.
.   46703 IN NS m.root-servers.net.
;; Received 228 bytes from in 44 ms

com.   172800 IN NS f.gtld-servers.net.
com.   172800 IN NS d.gtld-servers.net.
com.   172800 IN NS a.gtld-servers.net.
com.   172800 IN NS l.gtld-servers.net.
com.   172800 IN NS i.gtld-servers.net.
com.   172800 IN NS b.gtld-servers.net.
com.   172800 IN NS m.gtld-servers.net.
com.   172800 IN NS k.gtld-servers.net.
com.   172800 IN NS j.gtld-servers.net.
com.   172800 IN NS h.gtld-servers.net.
com.   172800 IN NS c.gtld-servers.net.
com.   172800 IN NS e.gtld-servers.net.
com.   172800 IN NS g.gtld-servers.net.
;; Received 494 bytes from in 136 ms

mitemitreski.com. 172800 IN NS ns71.domaincontrol.com.
mitemitreski.com. 172800 IN NS ns72.domaincontrol.com.
;; Received 118 bytes from in 174 ms

mitemitreski.com. 3600 IN A
mitemitreski.com. 3600 IN NS ns71.domaincontrol.com.
mitemitreski.com. 3600 IN NS ns72.domaincontrol.com.
;; Received 102 bytes from in 126 ms

And basically we got the redirects from the top-level domains to our host.
Let say we want to know the MX records for a server, we write
 dig mx gmail.com 


; <<>> DiG 9.7.1-P2 <<>> mx gmail.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 23455
;; flags: qr rd ra; QUERY: 1, ANSWER: 5, AUTHORITY: 0,

;gmail.com.   IN MX

gmail.com.  3586 IN MX 30 alt3.gmail-smtp-in.l.google.com.
gmail.com.  3586 IN MX 10 alt1.gmail-smtp-in.l.google.com.
gmail.com.  3586 IN MX 40 alt4.gmail-smtp-in.l.google.com.
gmail.com.  3586 IN MX 20 alt2.gmail-smtp-in.l.google.com.
gmail.com.  3586 IN MX 5 gmail-smtp-in.l.google.com.


For the full description take a look at the dig man page or on-line at:

Other references


Apr 15, 2011

Top Hipster Videos

According to a Wikipedia article:
Hipster is a slang term that first appeared in the 1940s, and was revived in the 2000s and 2010s to describe types of young, recently settled urban middle class adults and older teenagers with interests in indie rock, independent film, magazines such as Vice and Clash, and websites like Pitchfork Media.[1] In some contexts, hipsters are also referred to as scenesters.[2]
"Hipster" has been used in sometimes contradictory ways, making it difficult to precisely define "hipster culture" because it is a "mutating, trans-Atlantic melting pot of styles, tastes and behavior[s]..
Here are the videos I hope I have not left any good hipster videos :)

Being a Dickhead's Cool

Hipster Superheroes

Hipster Song

Hipster Olympics

SuperNews!: Hipsters in Space: Jihad is Rad: SuperNews!

Apr 12, 2011

Knuth in a year or two, and more...

 The idea is similar to http://www.ibiblio.org/taocprg/. Generally speaking the motivation is also very similar, so let see:

The Motivation

I do have an Informatics and Computer Engineering diploma degree(well in a month or two) but we have only passed some of the parts of TAOCP and definitely not in that much detail. Also, this fits nicely with my idea to go back to the basics once more. I have been working in Java EE, and I feel that web application programming does not give too much space for using innovation at least not in using algorithms that are a little bit more advanced. Java haters would now say that this is because I'm using Java, but that is definitely not the case, I have also used python and a little bit of clojure and this does not change the problem. Yeah maybe some language is more elegant for some job but in the end, it is just a language. Now yes I was working on financial products, but that does not give me any excuse, maybe some other web apps require another skill set. Also, I think that if I had better algorithmic knowledge, that maybe I would not make some mistakes, also it's fun.

The plan

The Art of Computer Programming series are currently on the plan, but also I'm planning on going back to C once more, Little bit of Unix programming for I believe that Linux System Programming: Talking Directly to the Kernel and C Library would be a good start then I think that next good step would be Operating Systems Design and Implementation (3rd Edition). And we'll see what would be next.

The best part is last

I'm not alone (YEAH!!! ). I have found at least one other person interested in the project so this will be great.

We are going to make a reading plan in a day or two. And we will try to make regular meetings each week, the first few months will probably the meetings will take place in "Кика - Хаклаб" and they will be open, during the summer we'll move everything online.

You don't have to be from Macedonia to join us!

Currently, you can find us at #lugola, irc.freenode.org

We are going to post the plan shortly

2015 conference talks

The past 2015 has been very eventful year for me on both professional and private plan. I got married, moved to Sweden, started working f...

Popular posts