Skip to content

Instantly share code, notes, and snippets.

View deep5050's full-sized avatar
๐Ÿ’ป
EMBEDDED SYSTEM

Dipankar Pal deep5050

๐Ÿ’ป
EMBEDDED SYSTEM
View GitHub Profile
@deep5050
deep5050 / dipankar_server_thread.c
Last active April 5, 2020 10:14
USAGE: <port> <baklog> multi threaded implememtation of the sever
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <string.h>
#include <netdb.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <signal.h>
@deep5050
deep5050 / dipankar_client.c
Created April 5, 2020 10:33
client server application implemented in C ( kinda Remote Terminal)
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#include <string.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <signal.h>
@deep5050
deep5050 / timestamp.c
Last active April 16, 2020 09:54
human readable timestamp in c
char *timestamp()
{
struct tm *local;
time_t t = time(NULL);
char *str;
/* Get the localtime */
local = localtime(&t);
str = asctime(local);
@deep5050
deep5050 / establish_server.c
Created April 16, 2020 10:00
establish a server on the first available ip address
/* This function establish a server on the first available address
args: char* port
int backlog value
return: update the server_IP : server IP adress on which it has bind
*/
int establish_server( char *port, int backlog, char *server_IP)
{
int yes = 1;
struct addrinfo server_addr, *results, *p;

Contribution

All kinds of contributions are welcome ๐Ÿ™Œ! The most basic way to show your support is to star ๐ŸŒŸ the project, or to raise issues ๐Ÿ’ฌ You can also support this project by becoming a sponsor on GitHub ๐Ÿ‘ or by making a [Payp

@deep5050
deep5050 / Unicorn.md
Last active September 6, 2020 08:59
Unicorn logo
We couldnโ€™t find that file to show.
@deep5050
deep5050 / change_email.sh
Created November 11, 2020 15:52
NaughtyLust upload
#!bin/sh
git filter-branch --env-filter '
OLD_EMAIL="[email protected]"
CORRECT_NAME="Dipankar Pal"
CORRECT_EMAIL="[email protected]"
if [ "$GIT_COMMITER_EMAIL" = "$OLD_EMAIL" ]
then
export GIT_COMMITER_NAME="$CORRECT_NAME"
export GIT_COMMITER_EMAIL="$CORRECT_EMAIL"
cloc ./ --quiet --hide-rate --unix --timeout=10 --by-file-by-lang --md --vcs=git --git --ignored=ignored.txt --by-percent=cmb
https://www.prothomalo.com/topic/%E0%A6%97%E0%A6%B2%E0%A7%8D%E0%A6%AA
https://www.kishoralo.com/golpo/%E0%A6%B6%E0%A6%BF%E0%A6%95%E0%A7%8D%E0%A6%B7%E0%A6%BE%E0%A6%B8%E0%A6%AB%E0%A6%B0-%E0%A6%AC%E0%A6%9F%E0%A7%87
https://www.w3newspapers.com/bangladesh/
https://www.prothomalo.com/onnoalo/stories/
https://www.jugantor.com/literature/355847/%E0%A6%9B%E0%A7%8B%E0%A6%9F-%E0%A6%97%E0%A6%B2%E0%A7%8D%E0%A6%AA-%E0%A6%AA%E0%A6%BE%E0%A6%B9%E0%A6%BE%E0%A6%A1%E0%A6%BC%E0%A6%BF-%E0%A6%B0%E0%A6%B6%E0%A7%81
@deep5050
deep5050 / greet_issue_raiser.yml
Created December 22, 2022 06:16
greet an issue raiser on new issues
name: Issue Greeting
on:
issues:
types: [opened]
jobs:
greet_user:
runs-on: ubuntu-latest
steps: