xaizek / hstr (License: Apachev2) (since 2018-12-07)
Bash and Zsh shell history suggest box - easily view, navigate, search and manage your command history.
<root> / tests / src / test_ranking.c (d055bf4e898af1953c6d1f6af8872bc4f6e4f780) (617B) (mode 100644) [raw]
/* Test
 */

#include <stdio.h>
#include <math.h>

void testLog() {
	const int HISTORY_SIZE=2000;
	int i;
	for(i=0; i<HISTORY_SIZE; i++) {
		printf("\n%d # l: %f # l10: %f # l2: %f", i, log(i), log10(i), log2(i));
	}
}

#define MAX_CHARACTER_CODE 10000
static char line[MAX_CHARACTER_CODE];

void testGenerateCrazyHistoryFile()
{
	FILE *file = fopen(".bash_history_crazy","a");
	fseek(file,0, SEEK_END);

	line[0]=0;
	int i;
	for(i=0; i<MAX_CHARACTER_CODE; i++) {
		sprintf(line,"%s%c",line,i);
		fprintf(file,"%s\n",line);
	}

	fclose(file);
}

int main(int argc, char *argv[])
{
	testGenerateCrazyHistoryFile();
}

Hints

Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://code.reversed.top/user/xaizek/hstr

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/hstr

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master