adder46's comments

adder46 | 5 years ago | on: Show HN: Unix style CLI client for dpaste.com

dpaster-rs is a UNIX-style command-line client interface for the dpaste.com.

If you often need to share code or output of some command in a pastebin, this tool will lift some of the burdens from your back. It reads from stdin by default if no file argument is passed, meaning it perfectly fits a UNIX-style workflow. It is configurable and easy to use. Check out the README for examples on how to install it and how to use it:

https://github.com/adder46/dpaster.rs

Any critiques regarding improving the code quality, architecture, or functionality, are more than welcome.

adder46 | 5 years ago | on: Show HN: A Terminal Tetris Game

I wanted to share my attempt at implementing the classic tetris game. It works in the terminal and uses the ncurses-rs bindings for the UI part. For me, the coolest part about it is that the tetrominos and their rotations are encoded as 16-bit unsigned integers. For example, to represent a square, we want 51! Why 51? Because 51 decimal is `0b0000000000110011`. We can make 4x4 Vec from that, and we get:

``` [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 1, 1], [0, 0, 1, 1]] ```

Notice how the 1s form a square?

As I'm still learning Rust, any suggestions regarding the architecture, overall design of the game, more idiomatic code, etc., are very welcome.

If you want to play or just see how it turned out, check out:

https://github.com/adder46/tetris.rs

adder46 | 5 years ago | on: Show HN: History suggest box for your Python shell

pyhstr is a history suggest box for Python shells. It lets you quickly access the commands in your shell history. Just search for the command you want to execute (regex mode is supported), or, if you don't exactly know what you're looking for, you can browse through the commands until you find the one you want to execute. Apart from this, you can delete unwanted items from your history, too, and more. It works on all terminals ranging from linux term to alacritty to xterm. It was initially made for the standard Python shell but it should work with IPython and bpython, too.

It has been my daily driver for a while now.

Check out the README for instructions if you want to try it out.

Suggestions, bug reports, etc. are welcome.

Let me know what you think:

https://github.com/adder46/pyhstr

adder46 | 5 years ago | on: Show HN: History suggest box for your shell

hstr-rs is a shell history suggest box that provides quick access to the commands in your shell history. Just search for the command you want to execute (regex mode is supported), or, if you don't precisely know what you're looking for, you can browse through the commands until you find the one you want to execute. Apart from this, you can delete unwanted entries from your history, too, and more. It should work on all terminals ranging from linux term to xterm. It was initially made for bash but it should work as well with zsh, ksh, and tcsh, too.

I use it on a daily basis.

Check out the README for instructions if you want to try it out.

Suggestions, bug reports, etc. are welcome.

Let me know what you think:

https://github.com/adder46/hstr-rs

adder46 | 5 years ago | on: Dpaster – command-line client interface for the dpaste.com pastebin

Since I spend a lot of time on IRC and I often need to share something in a pastebin, I wrote a little script to help me with that process and lift some of the burdens from my back. It's called dpaster, and it's actually a command-line client interface for the dpaste.com pastebin. It's configurable and easy to use. It reads from stdin by default if no file argument is passed, which means you can use it as a part of some UNIX pipeline. It can even guess syntax to highlight (limited to pygments' guessing ability ¯_(ツ)_/¯).

Check it out and let me know what you think:

https://github.com/adder46/dpaster

adder46 | 5 years ago | on: GitHub download speed discrimination based on location

I'm downloading a release from Github and the download speed does not exceed 50KBps. So, I investigated a bit what was going on and I stumbled upon the linked reddit thread. It seems that Github and Microsoft prioritize connections from the US, thus discriminating the rest of the world. Very disappointing for such a huge corporation.

adder46 | 5 years ago | on: Pyhstr now has IPython support

pyhstr is history suggest box for the standard Python shell. It also works with IPython.

This app lets you quickly search, navigate and manage your Python shell history.

Various issues were fixed, should be pretty usable now.

page 1