9 Reusable Code Snippet Topics

Remove Filter
Member Avatar for
Member Avatar for chriswelborn
Member Avatar for chriswelborn

I'm no pro when it comes to BASH, but I have been known to shell-script my way out of a problem here and there. One of the useful things you can do is a for-loop, whether it be used on file names, script arguments, or just a string of words. …

Member Avatar for chriswelborn
0
298
Member Avatar for chriswelborn

I'm no pro when it comes to BASH, but I have been known to shell-script my way out of a problem here and there. One of the useful things you can do is a for-loop, whether it be used on file names, script arguments, or just a string of words. …

Member Avatar for chriswelborn
0
377
Member Avatar for chriswelborn

This is another useful script I came across. It prints a color-code chart in your terminal. It can help you find the color-code you are looking for, or view the current color-scheme you are using (people use it on reddit/r/unixporn to show off their system's theme, I use it to …

0
371
Member Avatar for chriswelborn

I didn't write this, the credits are in the code. It's a code-golf version, and I'm sorry about that. I am trying to 'decode' it but I don't have the skills, so the 'decoded' version doesn't have the right colors. This is an example of what you can do with …

0
1K
Member Avatar for ShawnCplus

I ran across the need to view a specific line of a file so I wrote this up. You can view a line or a range of lines for a file or compare two files. Check the command for the syntax. Drop it in /usr/bin/sln and enjoy.

Member Avatar for ShawnCplus
0
226
Member Avatar for ankur.dhoot

This code changes color of prompt according to user, suppose if user is root then color would be red and normal user would have color black. This'll diffrentiate in users.

0
146
Member Avatar for Stylish

Here is a little spinner thing for the command line, used when your current bash script is waiting on a background/system process. The weird character is ^H or a backspace.

Member Avatar for cfajohnson
0
250
Member Avatar for Paul.Esson

I know what your thinking, You and everyone else has always wanted a clock that sits at the top of your command prompt and tells you the time. Why ? I made this in first year when i spent countless hours programming and little in bed. I decided i needed …

Member Avatar for Mpiangu
0
158

The End.