360 Commits (a14798aab4df554954ff3cbce4232bc5394a1e31)

Author SHA1 Message Date
Petr Šťastný a14798aab4
Added most useful i3 keybindings 5 years ago
Igor Chubin 7c88ba98f0 moved _scala/:main to _scala/_info.yaml (fixes #84) 5 years ago
terminalforlife 0b61d3884e Fetch unique list of uppercase-only variables
Just wrote this because I'm wanting to convert numerous uppercase
variables in lots of shell programs to lowercase, except the initial
letter of a word. Manually, doing this would take forever.

First, however, I need to compile a list of variable names so I know
for what I want to search and replace, then omit certain ones typically
named in all uppercase, like `UID`, `USER`, `HOSTNAME`, etc, which I
will probably do by parsing `env` and various other special parameters
used by Bash.

Fun times.
5 years ago
terminalforlife 0ab091a8cd Add alternative approach to parsing `xev` 5 years ago
terminalforlife 81711828bc Add more examples using associate array variables 5 years ago
terminalforlife 6e507588ec Prefer `grep -[EF]` over deprecated `[ef]grep` 5 years ago
terminalforlife cd41a3e2ca Add line to list out available sections 5 years ago
terminalforlife 9c6e04b5c0 Add line to list unique DEB sections, using awk 5 years ago
terminalforlife c08786cb0e Added alternative syntax for easier reading 5 years ago
terminalforlife 25f4ef1390 Add examples for `dpkg-deb` 5 years ago
terminalforlife 2c2a1f4fb6 Add file 'dpkg-deb' 5 years ago
terminalforlife e699f7c298 Add two examples for `apt-cache` 5 years ago
terminalforlife a388ee6534 Add file 'apt-cache' 5 years ago
terminalforlife 6955dd2709 Add extra information on source 5 years ago
terminalforlife b83d187fee Add file 'source', and briefly show its usage 5 years ago
terminalforlife 2e4f7be1b8 Add examples and detailed explanation of `umask` 5 years ago
terminalforlife be76804476 Add file 'umask' 5 years ago
terminalforlife 9feb9d7ddf Add a multitude of examples for apt-get 5 years ago
terminalforlife 4a67b1d9ad Add file 'apt-get' 5 years ago
terminalforlife 27c86e12f5 Add a number of examples for udisksctl 5 years ago
terminalforlife f5ec296286 Add 'udisksctl' file 5 years ago
terminalforlife cddd2c0e11 List executable files found in PATH
Many uses for this!

Say you install a large set of updates, so want to cross-check the old
list to the new one, in order to find out which new executables were
installed.

Or, perhaps less obscure, you might this list, without the `-printf`
part, to check their permission and ownership settings.
5 years ago
terminalforlife a7e9bd13e1 Add 'nl' file and show basic example
Interestingly -- to me, at least, `nl` by default will only number
non-empty lines (coreutils v8.25), whereas `cat` will show all.
5 years ago
terminalforlife f04907ea0d Add examples and clean up existing ones
The examples given using xargs are so far mostly never or rarely ever
best used or even well used with xargs, such as with find, which is
popular, unfortunately.

My reason for adding counters to some of these examples, is that, as an
educational resource, I believe it's important users understand what is
and is _not_ good practice; this is, at least, how I taught myself.
5 years ago
terminalforlife 76109ca8cd Add 'sed' and give example of in-place changes
The `-i` flag with `sed` means "in-place", if you're curious; the use
thereof allows for making actual changes to the file, not just
superfluously, such as for additional parsing.

The `s///` is a simple substitution, wherein the `s` marks that it's a
substitution, the `/` marks the boundaries*, and the final boundary can
be suffixed with various flags, such as `g`, for global operations, -
and `i`, for case-insensitive operations.

* required, but the slash can switched for something else, if needed, -
such as `|`, which is commonly used for paths. For example:

  `s|/path/to/file|/path/file|`
5 years ago
terminalforlife 8af39f5168 Merge with upstream master 5 years ago
terminalforlife 69bbce3d28 Add vignette and grayscale example
I mostly use this sort of thing to create backgrounds which seem to go
nicely with my terminal theme and layout. Works well on nature images.
5 years ago
terminalforlife 0f22053f54 Fix and clean code and comments
The for loop was problematic for numerous reasons my headache won't
allow me to list. I've optimized it, while hoping to maintain the point
for which it was submitted.

A couple of typos were fixed; nothing major.
5 years ago
Igor Chubin 2a42d6b73d
Merge pull request #79 from terminalforlife/master
A Few Additional Code Lines (Likely More to Come)
5 years ago
Igor Chubin 3bb0fbb1c8
Added missing / 5 years ago
Nic Acton 6530225403
sheet for /proc pseudo-directory
Feel like there's good use. There's a `man proc` so this can do that as well.
5 years ago
terminalforlife 86007dd5db Delete extension-specific files using logic
This was taken from my own notes amassed over several years. Commands
like these are a real time-saver.

A lot of people, I imagine, will probably use `-exec rm {} \+` which is
fine and all, but it's another process you'd have to launch, which
isn't necessary at all, unless you need certain `rm` functionality.
5 years ago
terminalforlife 8e5e9dd0a4 Minor comment cleanup, to keep it consistent 5 years ago
terminalforlife d69a3c8e3a Very useful when you need to test for certain permissions. I imagine
this would be most useful when dealing with more advanced permission
schemes.
5 years ago
terminalforlife c12d8e2df2 Show counting lines awk reads from STDIN
This is useful, but not if this is _all_ you're after; in those
cases, you're better off just using `free | wc -l` or similar.

However, there may be times you need to count the number of lines in
order to achieve _other_ things programmed in awk, which would then be
crucial!

For example, you may wish to output text informing the user of how many
log entries were discovered in one or more files given to awk.
5 years ago
terminalforlife ff4af91485 Access environment variables from within awk.
ENVIRON is a special associative array variable, and LS_COLORS is an
index therein. If you want to see the available variables you could
use, you could execute the trusty `env` command.
5 years ago
terminalforlife fec416c763 Show using awk without data via STDIN
This is useful for those times you want to just do something in awk, -
on-the-fly, without having to rely on its standard input (STDIN).

It's especially handy when you want to perform floating-point
arithmetic, if you're not a shell like ZSH which does support it.
5 years ago
Igor Chubin 8566d86739
Merge pull request #73 from Nondv/patch-4
add note on ruby -l switch
5 years ago
Igor Chubin f7f987fd68
Merge pull request #74 from Nondv/patch-5
[ruby][case] Add a note about ===
5 years ago
Igor Chubin 453904eb92
Merge pull request #76 from Nondv/divide-emacs
[emacs] move some info to separate files
5 years ago
Igor Chubin 32e18c603a
Merge pull request #77 from Nondv/patch-1
[ruby] merge if/else with if/elsif/else
5 years ago
Dmitry Non d68cc4281a delete recursion from root
there's theory/recursion for that
5 years ago
Dmitriy Non 32ab01e12a
remove extra empty line 5 years ago
Dmitriy Non 4cabda0a56
[ruby] merge if/else with if/elsif/else
No need to add extra lines to the output. Shorter is better :)
5 years ago
Dmitry Non 0dd42bed00 [emacs] move macros info to new file 5 years ago
Dmitry Non 246adf89fc [emacs] move dired to new file 5 years ago
Dmitry Non 6ae4d1ad45 [emacs] move telnet to new file 5 years ago
Dmitriy Non 6083bca0a8
[ruby][case] Add a note about ===
A bit advanced but required knowledge about the magic in `case`
5 years ago
Dmitriy Non 10313bda28
add note on ruby -l switch
Quite a useful switch for one-liners
5 years ago
Igor Chubin ed061663ba
Merge pull request #71 from lucis-fluxum/python3-args-kwargs
*args, **kwargs for python
5 years ago