Thanks to visit codestin.com
Credit goes to gist.github.com

Skip to content

Instantly share code, notes, and snippets.

View indrabrata's full-sized avatar
❄️
stay hydrated

Indra Brata indrabrata

❄️
stay hydrated
View GitHub Profile
@indrabrata
indrabrata / .zshrc
Created August 26, 2024 13:34 — forked from dimitardanailov/.zshrc
My personal zsh and tmux configurations
# Path to your oh-my-zsh installation.
export ZSH=/Users/dimitar.danailov/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
# ZSH_THEME="robbyrussell"
ZSH_THEME="agnoster"

Conventional Commit Messages

See how a minor change to your commit message style can make a difference.

Tip

Have a look at git-conventional-commits , a CLI util to ensure these conventions, determine version and generate changelogs

Commit Message Formats

Default

@indrabrata
indrabrata / fork.c
Created March 27, 2024 10:45
Process and Thread - Operating System
#include <stdio.h>
#include <unistd.h>
/* This program forks and and the prints whether the process is
* ‐ the child (the return value of fork() is 0), or
* ‐ the parent (the return value of fork() is not zero)
*
* When this was run 100 times on the computer the author is
* on, only twice did the parent process execute before the
* child process executed.
*
@indrabrata
indrabrata / conditional_variable.c
Created March 27, 2024 08:32
Synchronization - Operating System
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
int count = 0;
pthread_mutex_t count_mutex = PTHREAD_MUTEX_INITIALIZER;
pthread_cond_t condition_var = PTHREAD_COND_INITIALIZER;
// Write numbers 1‐3 and 8‐10 as permitted by functionCount2()
void *functionCount1()
{
for (;;)