Skip to content

Instantly share code, notes, and snippets.

View sachinites's full-sized avatar
💭
Conquering Segment Routing !!

Abhishek Sagar sachinites

💭
Conquering Segment Routing !!
View GitHub Profile
@sachinites
sachinites / ANSI.md
Created February 14, 2022 13:39 — forked from fnky/ANSI.md
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@sachinites
sachinites / future.c
Created March 13, 2021 19:12 — forked from Geal/future.c
small future and promise library in C with pthreads
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
#include <unistd.h>
#include <stdbool.h>
#include <time.h>
#include <stdarg.h>
#include <string.h>
#include "future.h"
@sachinites
sachinites / route_dump.c
Created July 28, 2019 21:46 — forked from cl4u2/route_dump.c
Linux route monitoring example
/*
iflist.c : retrieve network interface information thru netlink sockets
(c) Jean Lorchat @ Internet Initiative Japan - Innovation Institute
v1.0 : initial version - Feb 19th 2010
This file was obtained at the following address :
http://www.iijlab.net/~jean/iflist.c
@sachinites
sachinites / custom_iterator.cpp
Created April 18, 2018 18:48 — forked from jeetsukumaran/custom_iterator.cpp
Sample C++/STL custom iterator
// Sample custom iterator.
// By perfectly.insane (http://www.dreamincode.net/forums/index.php?showuser=76558)
// From: http://www.dreamincode.net/forums/index.php?showtopic=58468
#include <iostream>
#include <vector>
#include <algorithm>
#include <iterator>
#include <cassert>