edryd.org

Unnamed repository; edit this file 'description' to name the repository.
git clone git://edryd.org/edryd.org
Log | Files | Refs | LICENSE

commit 67d695540129640497289aded7d6e6099eccbb1e
parent 367c43346ffa55b78727a0b80d3c4ccac265d514
Author: Ed van Bruggen <edvb54@gmail.com>
Date:   Wed,  9 Aug 2017 01:55:25 -0700

Add scripts to projects page, cleanup old projects

Diffstat:
_data/projects.yml | 32++++++++++++++++++--------------
_includes/project.html | 7++++++-
_layouts/projects.html | 11+++++++----
projects/$.md | 12++++++++++++
projects/calc.md | 16++++++++++++++++
projects/cboy.md | 61-------------------------------------------------------------
projects/ed.md | 47+++++++++++++++++++++++++++++++++++++++++++++++
projects/edion.md | 31-------------------------------
projects/g.md | 16++++++++++++++++
projects/ratium.md | 61-------------------------------------------------------------
projects/sett.md | 31+++++++++++++------------------
projects/todoium.md | 42------------------------------------------
12 files changed, 135 insertions(+), 232 deletions(-)

diff --git a/_data/projects.yml b/_data/projects.yml @@ -3,29 +3,33 @@ main: desc: 'config files for my linux setup' - name: 'nt' desc: 'simple note taker' - - name: 'tim' - desc: 'extendable personal assistant' + - name: 's' + desc: 'command line interpreter' + link: 'https://github.com/rain-1/s' - name: 'gs' desc: 'gist creator' - name: 'dmenium' desc: 'small collection of dmenu scripts' - - name: 'dmenu-center' - desc: 'center dmenu in the middle of the screen' - name: 'dmenu.vim' desc: 'dmenu functions for vim' + - name: 'dmenu-center' + desc: 'center dmenu in the middle of the screen' - name: 'catium.vim' desc: 'add an element of nyan cat to vim' + - name: 'tim' + desc: 'extendable personal assistant' - name: 'tg' desc: 'quickly tag files' + - name: 'checkium' + desc: 'functions to display shell error code' + - header: 'scripts' + - name: 'ed' + desc: 'commands revolving around $EDITOR' - name: 'sett' desc: 'set title of a terminal' - - name: 'checkium' - desc: 'funtions to display shell error code' - - name: 'edion' - desc: 'group of commands revolving around $EDITOR' - - name: 'todoium' - desc: 'simple todo program' - - name: 'ratium' - desc: 'an extendible top-down pixel adventure game' - - name: 'cboy' - desc: 'a small wild west themed ASCII game made for 7DRL 2015' + - name: 'calc' + desc: 'preform fast calculations on the go' + - name: '$' + desc: 'blindly copy commands from the internet' + - name: 'g' + desc: 'tiny git wrapper' diff --git a/_includes/project.html b/_includes/project.html @@ -1,3 +1,8 @@ <li> - <a href="/projects/{{ project.name }}.html">{{ project.name }}</a> — {{ project.desc }} + {% if project.link %} + <a href={{ project.link }}> + {% else %} + <a href="/projects/{{ project.name }}.html"> + {% endif %} + {{ project.name }}</a> — {{ project.desc }} </li> diff --git a/_layouts/projects.html b/_layouts/projects.html @@ -5,9 +5,12 @@ layout: default <h1>projects</h1> <ul class="project-list"> - {% for item in site.data.projects.main%} - <li> - <a href="/projects/{{ item.name }}.html">{{ item.name }}</a> — {{ item.desc }} - </li> + {% for project in site.data.projects.main %} + {% if project.name %} + {% include project.html %} + {% elsif project.header %} + <p></p> + <h2>{{ project.header }}</h2> + {% endif %} {% endfor %} </ul> diff --git a/projects/$.md b/projects/$.md @@ -0,0 +1,12 @@ +--- +title: $ +description: blindly copy commands from the internet +--- + +```bash +#!/usr/bin/env bash + +# $: blindly copy commands from the internet + +"$@" +``` diff --git a/projects/calc.md b/projects/calc.md @@ -0,0 +1,16 @@ +--- +title: calc +description: preform fast calculations on the gooooo +--- + +```bash +#!/usr/bin/env bash + +# calc: preform fast calculations on the gooooo +# +# Tired of having to open a new terminal, run `bc`, type the calculation, only +# to exit right after seeing the answer? Suffer no longer! Now just type +# `calc 2+2` and instantly see the answer! + +echo "$@" | bc -l +``` diff --git a/projects/cboy.md b/projects/cboy.md @@ -1,61 +0,0 @@ ---- -title: cboy -description: 'a small wild west themed ASCII game made for 7DRL 2015' -tags: game ---- - -A very small wild west themed roguelike where you play a c(ow)boy who was given -a job to kill the corrupt townspeople in the area - -Cboy should run on any Unix based OS (Linux, BSD, Mac) as long as ncurses is -installed, which is default on most systems. To compile the program type `make` -into a terminal. To run type `./cboy` in the same directory. If you have any -problems with compiling or running feel free to contact me at: edvb54@gmail.com - -## Keys - -Move around with: - -q w e - -a s d - -z x c - -Hold down shift with movement keys to change direction - -Other keys: - -| Key | Function | -| --- | -------- | -| g | get item or cycle through inventory | -| v | drop item | -| f | use item | -| r | load gun | -| o | open door | - -## Items - -| Char | Name | Type | -| ---- | -------- | ----- | -| $ | gold | gold | -| % | beef | food | -| / | knife | knife | -| ) | revolver | gun | -| * | ammo | ammo | - -Food can be eaten with 'f' key and will heal your heath. When a knife is in -hand you do extra damage to others. A gun needs to be loaded with ammo every six -shots and changes to the ']' character when loaded. Then press 'f' to fire it -in direction you are looking. Gold increases your score which gets displayed at -the end of the game. - -## Entities - -| Char | Color | Name | Description | -| ---- | ----- | ---- | ----------- | -| c | grey | Cow | Drops beef when killed | -| @ | brown | Bandit | Tires to kill you when you attack someone | -| @ | grey | Angry Bandit | Always tires to kill you | - -Bandit's have a chance to drop gold and ammo when killed. diff --git a/projects/ed.md b/projects/ed.md @@ -0,0 +1,47 @@ +--- +title: ed +description: commands revolving around $EDITOR +--- + +```bash +#!/usr/bin/env bash + +# ed: edit files with your $EDITOR +# +# Opens a file with your $EDITOR. If no argument is given then it opens the +# whole directory into a tree view, or if there is only a few files in the +# current directly then it just opens all of them. + +if [[ "$@" == "" ]]; then + if [[ $(ls -l | wc -l) -le 5 ]]; then + $EDITOR ./* + else + $EDITOR . + fi +else + $EDITOR "$@" +fi +``` + +```bash +#!/usr/bin/env bash + +# ED: change between $EDITORs +# +# Toggles your $EDITOR between your different editors. +# To install add `source path/to/ED.sh` to your shell's rc file. + +ED() { + local new + if [[ "$1" != "" ]]; then + new="$1" + elif [[ $EDITOR == "vim" ]]; then + new="emacs" + else + new="vim" + fi + + echo "Setting \$EDITOR to $new" + EDITOR=$new +} +``` diff --git a/projects/edion.md b/projects/edion.md @@ -1,31 +0,0 @@ ---- -title: edion -description: 'group of commands revolving around $EDITOR' -tags: bash script linux ---- - -edion is a package of two useful command line tools for editing files in your -favorite text editor. - -The first one, `ed`, simply opens a file with your `$EDITOR`. If no argument -is given then it opens the whole directory into a tree view, or if there is -only a few files in the current directly then it just opens all of them. Also -if there is a file called `.vim.sh` in the current directory then `ed` will run -that file instead, which I use to open vim with many different files for that -project. - -The other program, `ED`, simply toggles your `$EDITOR` between different -commands that you can set. - -## SEE ALSO - -View source code at: <https://gitlab.com/edvb/edion> - -## AUTHOR - -Ed van Bruggen <edvb54@gmail.com> - -## LICENCE - -zlib License - diff --git a/projects/g.md b/projects/g.md @@ -0,0 +1,16 @@ +--- +title: g +description: tiny git wrapper +--- + +```bash +#!/usr/bin/env bash + +# g: tiny git wrapper + +if [[ $# -eq 0 ]]; then + git status +else + git "$@" +fi +``` diff --git a/projects/ratium.md b/projects/ratium.md @@ -1,61 +0,0 @@ ---- -title: ratium -description: 'an extendible top-down pixel adventure game' -tags: game c sdl ---- - -Ratium is a dumb little game where you play as an adventurer and have to -survive in a pixel world by defending yourself from various enemies, such as -the super rat. Collect items such as spam, swords, and arrows to aid you in -your battles and exploration. - -## COMMANDS - -| Key | Function | -| --- | ------------------- | -| h | Move left | -| j | Move down | -| k | Move up | -| l | Move left | -| e | Open inventory menu | -| r | Action key | -| t | Drop key | -| ESC | Quit | - -## ENTITIES - -| Name | Description | Heath | Attack | Drops | -| ----------- | --------------------------------- | ----- | ------ | ----- | -| Rat | A small pest | 2 | 1 | Meat | -| Super Rat | A rat you don't want to mess with | 4 | 2 | Meat | -| Gnu | A harmless animal that just wants to be free | 6 | 1 | Meat | -| Cow | "moo" | 2 | None | Meat | -| King Arthur | King of the Britons | 10 | None | Gold | -| Knight | A humble warrior | 10 | None | Sword | -| Peasant | A worthless low life | 10 | None | None | - -## ITEMS - -| Item | Description | -| ------ | --------------------------------------------- | -| Gold | Increase score | -| Spam | Eat to restore 3 heath | -| Sword | Hold to deal more 2 damage | -| Shield | Hold to block 4 damage | -| Bow | Hold to load then fire arrows up to 20 blocks | -| Arrow | Fire with bow to deal 5 damage | -| Meat | Eat to restore 1 heath | - -## AUTHOR - -Ed van Bruggen <edvb54@gmail.com> - -## SEE ALSO - -View source code at: <https://gitlab.com/edvb/ratium> - -See screenshots, videos, and binary download at: <http://edvb.itch.io/ratium> - -## LICENSE - -GPL v3 License diff --git a/projects/sett.md b/projects/sett.md @@ -1,24 +1,19 @@ --- title: sett -description: 'set title of a terminal' -tags: bash script cli linux +description: set title of a terminal --- -A small bash script to change the title of any terminal window. If no argument -is given it sets the title to the working directory, otherwise the given -*TITLE* is just used. +```bash +#!/usr/bin/env bash -## SEE ALSO - -View source code at: <https://gitlab.com/edvb/sett> - -`z`(1) `st`(1) - -## AUTHOR - -Ed van Bruggen <edvb54@gmail.com> - -## LICENCE - -zlib License +# sett: set title of a terminal +# +# Change the title of any terminal window. If no argument is given it sets the +# title to the working directory, otherwise the supplied TITLE is used. +title=$1 +if [[ -z $title ]]; then + title="$(basename "$PWD")" +fi +echo -n "]0;$title" +``` diff --git a/projects/todoium.md b/projects/todoium.md @@ -1,42 +0,0 @@ ---- -title: todoium -description: 'simple todo program' -tags: bash script cli linux ---- - -Todoium started out as a file with just `touch $HOME/.todo/$1`, but has since -evolved to be much more. - -To use Todoium just enter the keyword `todoium` followed by either an option or -the name of the todo you wish to create. All your todos are stored in -a directory, which is `~/.todo` by default. Each todo is an empty file with the -name of the file as the todo. This way you don't need to learn every weird -command to in order just to delete or rename todos, you can just use `rm` and -`mv`. - -Here is the list of options that you can use after typing `todoium`: - -| Option | Long Option | Description | -| ------ | ----------- | --------------------------- | -| -h | --help | Show Help/Info | -| -l | --list | List Your Todos | -| -t | --tree | List Your Todos Using Tree | -| -p | --path | Echo The Path to Your Todos | - -If you do not specify an option then Todoium assumes that you want to create -a todo in `$tododir` (`~/.todo/` by default). Note that you can not put spaces -in the todo's name (`todoium take out trash`), you have to type `todoium take\ -out\ trash` or `todoium "take out trash"`. But I recommend you just you use -hyphens or underscores (`todoium take-out-trash` or `todoium take_out_trash`). - -## SEE ALSO - -View source code at: <https://gitlab.com/edvb/todoium> - -## AUTHOR - -Ed van Bruggen <edvb54@gmail.com> - -## LICENCE - -GPL v3 License