Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am dungtran211096 on github.
  • I am dungtran2196 (https://keybase.io/dungtran2196) on keybase.
  • I have a public key ASB0iJJGBUYATq733YFh6S9-5BNe_svCF4D70hEScwCD4wo

To claim this, I am signing this object:

@dungtran211096
dungtran211096 / tail.py
Created May 7, 2018 09:30 — forked from amitsaha/tail.py
Simple implementation of the tail command in Python
'''
Basic tail command implementation
Usage:
tail.py filename numlines
'''
import sys
import linecache
@dungtran211096
dungtran211096 / dns.c
Created April 5, 2018 10:10 — forked from fffaraz/dns.c
DNS Query Code in C with linux sockets
//DNS Query Program on Linux
//Author : Silver Moon (m00n.silv3r@gmail.com)
//Dated : 29/4/2009
//Header Files
#include<stdio.h> //printf
#include<string.h> //strlen
#include<stdlib.h> //malloc
#include<sys/socket.h> //you know what this is for
#include<arpa/inet.h> //inet_addr , inet_ntoa , ntohs etc