Skip to content

Instantly share code, notes, and snippets.

View bhardwaj75's full-sized avatar
πŸ‘¨β€πŸ’»
Focusing

Bhardwaj_75 bhardwaj75

πŸ‘¨β€πŸ’»
Focusing
View GitHub Profile
@alan-mushi
alan-mushi / json_parser.c
Last active April 2, 2025 07:28
Examples for the json-c tutorial.
/*
* A simple example of json string parsing with json-c.
*
* clang -Wall -g -I/usr/include/json-c/ -o json_parser json_parser.c -ljson-c
*/
#include <json.h>
#include <stdio.h>
int main() {
struct json_object *jobj;
@amitsaha
amitsaha / tail.py
Last active August 9, 2024 18:42
Simple implementation of the tail command in Python
'''
Basic tail command implementation
Usage:
tail.py filename numlines
'''
import sys
import linecache