Skip to content

Commit

Permalink
Merge pull request #6 from mohamedeliwa/projects
Browse files Browse the repository at this point in the history
Projects
  • Loading branch information
mohamedeliwa authored Dec 15, 2024
2 parents dbaf79e + 875afcf commit 8707203
Show file tree
Hide file tree
Showing 8 changed files with 132 additions and 32 deletions.
2 changes: 1 addition & 1 deletion config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ socials = [
menu = [
# Configure menu bar here
# { name = "/posts", url = "/posts", weight = 1 },
# { name = "/projects", url = "/projects", weight = 2 },
{ name = "/projects", url = "/projects", weight = 2 },
{ name = "/about", url = "/about", weight = 3 },
# { name = "/tags", url = "/tags", weight = 4 },
]
Expand Down
34 changes: 34 additions & 0 deletions content/projects/bitcask.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
+++
title = "bitcask"
description = "A Log-Structured key/value storage engine as a partial implementation of the Bitcask engine."
weight = 1

[extra]
# You can also crop the image in the url by adjusting w=/h=
# remote_image = "https://images.unsplash.com/photo-1523821741446-edb2b68bb7a0?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1470&q=80"
+++

# Storage engine

It's basically a `Log-Structured key/value storage engine` as a partial implementation of the <a href="https://docs.riak.com/riak/kv/2.2.3/setup/planning/backend/bitcask/index.html" target="_blank">Bitcask</a> engine, created for learning and practice.

It offers high-performance reads and writes, subject to the requirement that all the keys fit in the available RAM, since the hash map is kept completely in memory.

The values can use more space than there is available memory, since they can be loaded from disk with just one disk seek.

A storage engine like Bitcask is well suited to situations where the value for each key is updated frequently.

In this kind of workload, there are a lot of writes, but there are not too many distinct keys—you have a large number of writes per key, but it’s feasible to keep all keys in memory.

# Storage Format

The underlying storage format is very simple: a text file where each line contains a key-value pair (Record), separated by a comma (roughly like a CSV file, ignoring escaping issues).

# Links

- <a href="https://github.com/mohamedeliwa/bitcask" target="_blank">Source code on Github</a>
<!-- - <a href="#" target="_blank">Posts written for this project</a> -->

<br />
<br />
<br />
11 changes: 0 additions & 11 deletions content/projects/project_1.md

This file was deleted.

11 changes: 0 additions & 11 deletions content/projects/project_2.md

This file was deleted.

6 changes: 3 additions & 3 deletions content/projects/project_3.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
+++
title = "Project 3"
description = "Example description"
weight = 1
# weight = 3

[extra]
remote_image = "https://images.unsplash.com/photo-1462556791646-c201b8241a94?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1465&q=80"
# remote_image = "https://images.unsplash.com/photo-1462556791646-c201b8241a94?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1465&q=80"
+++

Example project page
Example project page
6 changes: 3 additions & 3 deletions content/projects/project_4.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
+++
title = "Project 4"
description = "Example description with a lot of words but without any meaning. Why use lorem ipsum when you can just write a lot of text that has no underlying meaning?"
weight = 1
# weight = 4

[extra]
remote_image = "https://images.unsplash.com/photo-1620121692029-d088224ddc74?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1632&q=80"
# remote_image = "https://images.unsplash.com/photo-1620121692029-d088224ddc74?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1632&q=80&h=322.219&w=483.333"
+++

Example project page
Example project page
9 changes: 6 additions & 3 deletions content/projects/project_5.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
+++
title = "Project 4"
title = "Project 5"
description = "Example description"
weight = 1
# weight = 5

[extra]
# remote_image = "https://images.unsplash.com/photo-1650547002676-7cd5dea3175e?q=80&h=322.219&w=483.333&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D"
+++

Example project page
Example project page
85 changes: 85 additions & 0 deletions content/projects/rupit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
+++
title = "Rupit"
description = "a simple CLI tool to run long terminal commands by aliases"
weight = 2

[extra]
# local_image = "/projects/project-1.jpg"
# link_to = "https://github.com/not-matthias/apollo"
+++

# Intro

Rupit is a straightforward CLI tool designed to execute long, complex, and multi-step terminal commands using aliases.

It leverages a configuration file, `rupit.json`, which holds the list of aliases for Rupit to reference.

It functions similarly to how npm scripts are used in Node.js projects.

# How to use

For Linux users you can use the pre-built binary from the releases <a href="https://github.com/mohamedeliwa/rupit/releases" target="_blank">page</a>, it's built and tested on **Ubuntu 22.04.4 LTS**,

or you can build from source for linux, windows, and macOS systems using the following steps:

1. Pull the repo:

```sh
git pull [email protected]:mohamedeliwa/rupit.git
```

2. Build the project with:

```sh
cargo build --release
```

3. Put the release binary in a suitable execution path
4. Create `rupit.json` file, with a structure similar to the following:

```json
{
"aliases": {
"greetings": "echo \"Hello World\"",
"multistep": "cd ~; touch test.txt"
}
}
```

> Note: depending on your OS the path at which to put the file will be
> **Linux**: /home/\<user>/.config/rupit/rupit.json
> **Windows**: C:\Users\\\<user>\AppData\Roaming\Foo Corp\Bar App\rupit.json
> **macOS**: /Users/\<user>/Library/Application Support/com.Foo-Corp.Bar-App/rupit.json
5. Run the command with an alias name `rupit <ALIAS>`

```sh
rupit greetings
```

this will execute the following:

```sh
echo "Hello World"

Hello World
```

# Available Commands

- `rupit run <alias>` -> to run specific alias command from the config file.
- `rupit show -c` -> to show the expected path of the config file.
- `rupit show -a <alias>` -> to print the alias corresponding command without executing it.
- `rupit help` -> to print the help message

# Links

- <a href="https://github.com/mohamedeliwa/bitcask" target="_blank">Source code on Github</a>
<!-- - <a href="#" target="_blank">Posts written for this project</a> -->

<br />
<br />
<br />

0 comments on commit 8707203

Please sign in to comment.