Skip to content

Instantly share code, notes, and snippets.

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@heltonmarx
heltonmarx / sniffer.c
Created February 24, 2016 03:05
Sniffer tcp packages on port 7000 using libpcap
#include <pcap.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include <stdio.h>
#define MAXBYTES2CAPTURE 2048
/* processPacket(): Callback function called by pcap_loop() everytime a packet */
/* arrives to the network card. This function prints the captured raw data in */
@heltonmarx
heltonmarx / converter.c
Created October 28, 2015 20:52
latitude longitude converter
#include <stdio.h>
#include <stdlib.h>
float calculate(unsigned long x)
{
float f;
float delta = 0.000277778;
unsigned long limit = 0x7FFFFFFF;
if (x < limit) {