Skip to content

Instantly share code, notes, and snippets.

View Krush206's full-sized avatar

Matheus Garcia Krush206

View GitHub Profile
@Krush206
Krush206 / README.md
Last active October 6, 2023 11:49
A basic command interpreter. (For teaching purposes.)

Mysh

Moved to here.

The C Shell isn't bad.

The C Shell is one of the most reliable Shells I ever worked with. The C Shell inherited features from and is the only continuation on the Thompson Shell and Mashey Shell (the Shells included with Research Unix and PWB Unix, respectively). Erroneously, the C Shell is regarded as bad and glitchy. I beg to differ, though. Due to its "limitations", the C Shell is one of the most reliable Shells to work with. I added some comments on this Perl developer's complaints on the C Shell, in the hope it'll serve as a guide on how to adequately write scripts, as well as to encourage people on not giving up.

The power of a system comes more from the relationships among programs than from the programs themselves.

By following this principle, it's possible to get many interesting things out of Shells and any program at all. Control structures (namely, if/else) can be replaced wi

@Krush206
Krush206 / .cshrc
Created March 13, 2022 17:38
FreeBSD .cshrc with some convenient additions.
# $FreeBSD$
#
# .cshrc - csh resource script, read at beginning of execution by each shell
#
# see also csh(1), environ(7).
# more examples available at /usr/share/examples/csh/
#
alias h history 25
alias j jobs -l
@Krush206
Krush206 / pwgen_sh
Last active February 8, 2022 15:49
A Shell script to generate random strings.
grep -ao '[\!-~]' < /dev/urandom | \
head -$1 | tr -d '\n' # The first argument defines the length
echo ""
@Krush206
Krush206 / gksu-xterm
Last active February 8, 2022 23:38
A true gksu Shell script replacement
xterm -e su -c "$* &"
@Krush206
Krush206 / README.md
Last active October 6, 2023 11:46
A password-based Shell script for remote access.

Socat Remote Access

Moved to here.

@Krush206
Krush206 / sex
Created December 5, 2021 21:56
sex - stream editor for the ex text editor.
#!/bin/tcsh -f
echo "$1" | ex "$2"
@Krush206
Krush206 / partlayout4nandroid.delos3geur.txt
Created July 6, 2019 15:08
Partition layout for I8552/delos3geur devices
dev: size erasesize name
mmcblk0p1: 000014 000000 "unknown"
mmcblk0p2: 0000af 000000 "unknown"
mmcblk0p3: 005000 000000 "modem"
mmcblk0p4: 000001 000000 "unknown"
mmcblk0p5: 0003e8 000000 "unknown"
mmcblk0p6: 0003e8 000000 "unknown"
mmcblk0p7: 0007d0 000000 "unknown"
mmcblk0p8: 003000 000000 "boot"
mmcblk0p9: 000c00 000000 "unknown"