IMO, a better way to do this is by setting up a SSH certificate authority and avoiding authorized_keys files completely. Then when you sign your friends key you could specify an expiration time. The following example would give a friend access to your server for the next 2 weeks:
ssh-keygen -s ca_key -I user_friend -n friend -V +2w id_rsa.friend.pub
His/her login would be valid on all servers using this CA where the unix user "friend" exists and has login permissions. More info.
.bashrc: bind '"\t":menu-complete'
It's called cyclic tab completion. You're welcome.
edit: wait, that's not what you wanted. You wanted this:
.inputrc: set show-all-if-ambiguous on
You're still welcome.
i also didn't get the whole zsh awe, until i've set it up as my shell.
right off the bat, it offers you a config wizard to get you started, and it serves as a quick showcase of many fancy features of this shell.
zsh completion offers e.g. completion of command line parameters along with their explanations, which i haven't seen in bash so far (maybe it's a matter of completion definition files)
for more, you can read this : http://grml.org/zsh/zsh-lovers.html
after a few bumps and issues (especially the default odd del key behavior was irritating me) i grew to love it. but basically zsh is a very extensive shell, with many many features.
... I thought about it :-). Then I remembered, that some people didn't like the name of my command-line calculator insect due to bad associations. Well, not sure if "bat" is much better than "rat" in this respect.
Arguably not really a commandline program, but I had a paid account for ngrok at my last job. I didn't have to use it very often, but when I did it was a massive time saver. The $5/month gave us a great return of investment; developing my own solution would be far more time-consuming (and thus expensive).
I'd pay money for:
an IRC client that doesn't suck. Yes, I know about the IRC client you're about to suggest; I think it sucks. They all do.
I'd pay money for a better email client. I currently use claws-mail (GUI) and it's kind of okay, but quite slow for many operations. I also have a locally patched version and upstream never responded (much less integrated) my patch :-( I used mutt, but it's too hard/complex to set up/learn, and I don't use email enough to justify it.
I use Vim for ... everything, and I think it's pretty neat but I think it can be done better. vis is perhaps a good start, although not working on my white background has been a bit of a show-stopper thus far.
> You allocate a buffer for the size of the directory, and then call the getdents64 system call directly.
From man getdents
:
DESCRIPTION These are not the interfaces you are interested in. Look at readdir(3) for the POSIX-conforming C library interface. This page documents the bare kernel system call interfaces.
More information here from another utility that's faster than ls and POSIX-compliant.
In my opinion Spacemacs gives you the best of both worlds. Emacs is a much faster and more dynamic environment than a bash/zsh shell (which is where you end up spending a lot of time when you're working with Vim), while vim/evil-mode has tons of speed and ergonomic advantages over Emacs' standard editor.
That said, Emacs is a lot to take in initially and I'd definitely suggest learning vim by itself first (starting off with vimtutor) to really get comfortable with modal editing. You'll probably see lots of speed gains just from doing that. Hope that helps!
I'll go with Task/Time Warrior
As a person with ADHD this is the godsend to help me organize my life, check out the submodule taskopen with it and you have basically a Captain Log
> but does anyone know the meaning behind others?
Don't guess. Read the documentation:
> ‘-F
’
> ‘--classify
’
> ‘--indicator-style=classify
’
>
> Append a character to each file name indicating the file type. Also, for regular files that are executable, append ‘*
’. The file type indicators are ‘/
’ for directories, ‘@
’ for symbolic links, ‘|
’ for FIFOs, ‘=
’ for sockets, ‘>
’ for doors, and nothing for regular files. Do not follow symbolic links listed on the command line unless the --dereference-command-line
(-H
), --dereference
(-L
), or --dereference-command-line-symlink-to-dir
options are specified.
The man page is NOT the full documentation.
mutt (well, neomutt these days) because I can edit emails with vim, and I have coming up on 20 years of customization in it - it "just works" and I don't have to think, the interactions with it are pure muscle memory at this point.
After you read an email in mutt, you need to sync-mailbox
by pressing $
(by default).
Use the group-reply
command, which I think is bound to g
by default. (I've bound it to gr
to be more mnemonic, and more like gmail, and because I've remapped G
to last-entry
to be more like vim.)
Add set edit_headers
to your .muttrc
to be able to edit the subject, etc. while composing an email.
Start building an alias file. First, in your .muttrc, add set alias_file = ~/.mutt/alias
and source $alias_file
to your .muttrc.
Then in mutt, go to an email whose sender you want to add to your alias file.
Hit a
and just follow the directions.
I usually follow the following format: alias jsmith John Smith <[email protected]>
.
Now I can hit m
to start a new mail, type js<Tab>
and have it completed.
I'm not sure about gmail priority stuff, since I don't use it.
By the way, if you're planning to use mutt full time, you should take tomorrow morning off, brew a big pot of coffee, sit down, and read through the mutt manual, especially the configuration variables. Also google "mutt configuration" or "muttrc" and read how people have set theirs up. There are a ton of mutt gems out there which, once you find them, you can't imagine ever living without.
Author here. It has been some time since I last posted this here. I would like to get feedback especially from non-users. Do not hesitate to be rude though I may try to give answers :)
I am aware that lf
may still be missing some important features. If you are a ranger
user, feel free to say what you are missing that holds you to switch to lf
. It may help me prioritize what to work on in the future.
Lastly, if you do not want to install to give it a try, there are some screencasts in the tutorial.
zsh, simply for the completion and expansion options. For example, if you double-tap [tab] on an ambiguous command, bash's behaviour is to print all possible options and then open a new prompt - whereas ZSH displays the options but keeps you on your same line. And you can expand wildcards - so if I have some file /this/is/my_very_long_and_full_directory/file.ext
, I can do /this/is/my*/*.ext
, and it will expand to every options matching those wildcards (very useful for checking). Other people have their own favourite features, but these are mine.
And of course, it's backwards compatible with bash, so you can't lose!
YAY! And they've been busy making three releases so far.
lobsters discussion:
https://lobste.rs/s/wcw6c7/youtube_dl_repository_restored_at_github
Ultimately, it doesn't matter, whichever you click with first is fine.
VIM seems more commonly used (IMO) and has a shit ton of plug ins to let you configure it as you wish. but I use VIM so I might be biased (though I don't use a lot of plug ins, or really use it well).
EMACS is a fine operating system with a text editor built in. If there isn't a plug in for it, you can likely write a LISP program to do what you want. I keep wanting to use EMACS as an excuse to pick up LISP, but I just can't bring myself to do it.
But yeah, for where you are now, just pick one that seems to work best for you and run with it. By the time the difference between the two really matters, you'll be able to sort out why you want one or the other. Or just run EMACS with the VIM plugin.... or VIM with the EMACS plugin... either way.
Stack Overflow gets this question a lot
https://www.vim.org/scripts/script.php?script_id=300
https://stackoverflow.com/questions/1430164/differences-between-Emacs-and-vim
do you think you could support reading anki's flashcard format? https://apps.ankiweb.net/docs/manual.html
Not the entire spec but plaintext alone would be awesome... there isn't really a nice tui client out there as far as I'm aware
Nice work!
Something that keeps me attached to lf
(https://github.com/gokcehan/lf) is its client/server architecture which basically lets you open 2 instances and yank/paste files between them.
Other managers usually integrate some sort of “multiple views” functionality to achieve this, but lf
is really elegant in this sense, because it doesn’t try doing what a window manager/multiplexer does best.
But at the same time I’d love to use a simpler, non-curses FM that works similar to fzf, like the one you got here. Do you have any plans on doing a client/server architecture?
First try. Untested so far.
#!/usr/bin/env bash
# nullglob - make globs expand to nothing instead of themselves, when there are no matching files # nocaseglob - makes globs case insensitive; *.mp3 will match foo.MP3 shopt -s nullglob nocaseglob
while IFS= read -rd '' dir; do mp3s=( "$dir"/*.mp3 ) n=${#mp3s[@]} if (( n == 0 )); then continue elif [[ ! -e $dir/Folder.jpg ]]; then printf '# No Folder.jpg\n%s\n' "$dir" else read -r width height < <(identify -format "%w %h" "$dir/Folder.jpg") if (( width != height )); then printf '# Wrong aspect (%dx%d)\n%s\n' "$width" "$height" "$dir" elif (( width < 500 )); then printf '# Low res (%dx%d)\n%s\n' "$width" "$height" "$dir" fi fi done < <(find . -type d -print0)
The identify
command used here is part of ImageMagick. It's usually not installed by default, but typically available in your OS's package manager.
Project homepage: https://github.com/jarun/Buku
Features
Nice work! Your Data.json has 2 misconfigurations: URL is a mix of last.fm and dribble.com
"last.fm": {
"url": "https://dribbble.com/{}",
"errorType": "message",
"errorMsg": "Whoops, that page is gone."
},
And this is defined twice "Houzz": {
"url": "https://houzz.com/user/{}",
"errorType": "message",
"errorMsg": "The page you requested was not found."
},
You're thinking about addressing wrong.
Loopback isn't an addressable location, it's almost a command that tells your networking stack that you want to send this to yourself.
You need to assign the virtual boxes their own addresses on a bridged or virtual network and use those.
I personally use MOC (Music On Console) to play music. Although I don't know what advantages ncmcpp has, for I have never used it. But MOC is simple and gets the job done pretty well. I would recommend it.
Oh, and Midnight Commander comes in pretty handy. It's a simple ncurses based file manager. It reminds me of Gentoo.
I don't say rendering font data on the GPU is wrong. But that's not what this is about. The windows ui is gpu accelerated anyways. The font renderer probably as well. It doesn't make much sense to implement your own font rendering for the terminal of there's already one that does a perfectly fine job for the rest of the system.
Oh and the super hyper mega awesome fast Alacritty is much slower than you think: https://github.com/jwilm/alacritty/issues/179
They fixed this bug and only got to speeds comparable to or still slightly slower than non-gpu accelerated terminals.
https://rustup.rs/ > rustup is an official Rust project.
https://www.rust-lang.org/en-US/faq.html > What is this project's goal? > > To design and implement a safe, concurrent, practical systems language. > > Rust exists because other languages at this level of abstraction and efficiency are unsatisfactory. > In particular: > > 1. There is too little attention paid to safety.
Thing is, sometimes your script does a lot of calling other command line utilities. Use Python for that and you end up with tons of subprocess.run(...)
all over the place. I agree that a proper scripting language should be used for anything complex, but when you're doing a lot of interaction with other programs that don't have a convenient Python wrapper it can become very tedious and hardly easier. For example pass is written in bash, which I don't think is a bad idea.
I had a similar story: Vim => Spacemacs => Emacs => VSCode => Emacs.
The biggest downside to using Emacs is just configuration. Spacemacs was great for that but it was too slow. So I made my own Emacs config, and it was hours of pouring over it to make it right and work the way I wanted. I went to vscode and got rid of most of that configuration. But couldn’t get by with the Vim inside of VSCode and I hate being married to my mouse. So I went back to Emacs and recently found doom emacs. It’s cumbersome to extend but it’s been my daily driver for about 6 days now and I love it. Its like Spacemacs but faster, also more opinionated which is good/bad sometimes.
Audio problem. Audio problem. Audio problem.
People need to check their work before posting videos. sigh.
But it is nice to see (yet) another post about this handy tool which has been around for over thirty years. I have used it many many times. I still prefer a good compositing app for most everything, but imagemagick is great for some simple actions that I want to repeat from the command line.
If you like imagemagick, then you might want to check out graphicsmagick, which offers some improvements since it was forked from imagemagick.
I imagine that you could just email a gpg-encrypted message and then decrypt it with apg.
Check out w3m. In my opinion, it's the best terminal-based web browser out there. It supports mulitple tabs and a whole lot more.
Also check out /r/w3m for setup and other related info.
Neat trick! As a zsh user, I googled to see how I can enable that function in zsh, and stumbled upon this mail. It's now part of my .zshrc. :-)
Also, what's up with that blog? I've seen it linked quite a lot recently, and the posts are really interesting too.
Edit: eh, just realised it's your blog. Good work on the material there, I really enjoy reading it.
> From what I understand these terminals are quite dumb
Depends if you're using a text mode or the Linux framebuffer. The framebuffer is fully graphical, which means you can view images and play videos.
Be sure to include Explain Shell in whatever package of resources you give to newbies. This way they can type in commands they see and get an idea of what was actually done.
GNU diffutils has sdiff
for side-by-side diffs and diff3
for three-way merge diffs. These aren't interactive programs, but you can of course pipe them to less
or an editor.
OP, you don't have to download video at all if you just want to listen to the audio. A lot of tutorials for downloading audio from YouTube instruct you to use -x
to extract the audio only once you have downloaded video + audio, but since an update in February 2014 youtube-dl has been able to download them separately.
Use -F
, look for the format lines that say "audio only", and pass just one of those formats to -f
.
E.g. try youtube-dl -f 140 https://www.youtube.com/watch?v=nOMX3deeW6Q
Thank you for your reply and elaboration of your program. I wonder, do you plan on sharing the source code to your program? I’d love to look at it as a hobby, but, more importantly, if you post your code publicly, people will be able to help develop the program into a more secure version; while user’s with a malicious intent may be able to find exploits more easily. Considering that your software is written entirely in c and asm, it wouldn’t be too hard for a black hat to find a vulnerability and exploit it as the code size is likely small relative to similar projects and debuggers such as ida, gnu dbg, etc. shouldn’t have the hardest time translating the machine code back into pure c.
That all being said, there is one specific program I always remember for its security and sustainability. It seems much in the vein of your program. It is mutt, a mail client. (http://www.mutt.org) this program is still fully usable and used consistently by security-conscious users, and yet, it has been around for two decades and has only seen a very small handful of version changes. To most, it would baffle that you can get away with ~10 or so patches over 2 decades, but mutt somehow managed to do it. Some of the methodology of the program that enabled this was to focus on a small codebase which prioritized internal security and consistency in simple and finite patterns. I’d check that program out for reference. To this day it stands secure fully usable.
I'm always SSH'ed to my home machine anyway for IRC, so i just open a socks port with that. Then I use FoxyProxy and tell it to use the socks tunnel for reddit, imgur, etc. etc. -- the stuff my employer doesn't really care if I do, but i'd rather not have logged.
while googling around for xsmp, I found out this stack overflow thread, and the answer helped! Starting out vim with -X
flag fixes my problem. but it breaks clipboard integration :(
> How could I make something like this?
You need a simple TCP listener that pipes a file to the connecting party at a set speed. You then use VT100 escape codes to control the cursor.
> Or maybe a command line game over telnet?
There is Nethack as an example. You can try it at telnet nethack.alt.org
/u/spazzpp2 already mentioned howdoi
, https://github.com/gleitz/howdoi
There’s also “StackOverflow Importer” for Python, https://github.com/drathier/stack-overflow-import
This last one takes it a step further by getting an answer then checking if it’s valid. If it is, it imports it, if not, it tries the next highest voted.
This should help out.
"This page uses a table to display the correspondence of package management commands among some of the most popular Linux distributions."
Compiling either of those projects on Linux is pretty straightforward, actually. For both elinks and w3m, it's the classic ./configure && make && make install
inside the source directory. This will build the application and copy it to /usr/bin.
That said, neither of them have windows ports, so you'd have to run them in cygwin. Someone on the elinks mailing list claims to have a script that pulls the code and compiles it properly here.
Above all, though, is the question of "why"? By all accounts these are terrible browsers.
Since the OP is on Win10, installing WSL and running it in an ubuntu environment would probably be the easiest option of all.
Also, it appears lynx, another CLI browser, does have a win32 port. It's precompiled, too.
This should help you understand what the issue is..
Short story is, this program doesn't work correctly if certain security features in the Linux kernel are enabled. Personally, I wouldn't disable Yama just to use this app...
this is cheating, but go into the source directory/tracks and do
for trk in trk?data.h; do cut -c 3-4 $trk|xxd -ps -r >$trk.ogg; done
What about http://www.secdev.org/projects/scapy/? It pretty much beats every other tool in the category - the ease of use, sane defaults, scriptability and ability to work at L2 make it really awesome compared to hping or some other tool.
https://www.wireshark.org/docs/wsug_html_chunked/ChCustCommandLine.html
Wireshark using some of the flags. Don't bring up the GUI part of Wireshark. Will give me data in my terminal. Without bring up the Wireshark GUI window.
I'm not denying that stripping tags might be possible, but it's certainly extremely complex. For example, HTML5 says <div id=">">
is valid (with appropriate closing tag, ofc), which would break the niave regex used in the OP.
Try micro,
it has the usual keybindings
(except for tabs, Alt ,
is previous tab and Alt .
is next tab).
Here's the book on git. But essentially it boils down to:
git init
- in the directory you want to be the repo. Starts tracking file changes, etcgit add <filename/directory name>
- stages changes made to that file/directory (recursively)git commit -m 'some message describing changes'
- commits staged changesgit push origin master
- pushes the commit to the remote server/github repo/whateverOh god indeed it does.
I had foxy proxy set up for a number of different port numbers on localhost based on which server I needed traffic to go through, combined with the local proxy I was sitting behind, and setting up rules to redirect different sites through each one was just lovely.
I don't need to deal with that quite so complicatedly anymore, so I typically just switch on or off the proxy these days. FoxyProxy is a wonderful tool that is very well executed.
Try gkrellm
I sipped through it and found chart plugin here:
http://gkrellm.srcbox.net/Plugins.html Geoff Kuenning has implemented a chart plugin that monitors a file for numeric data and plots it on a chart so you can now have customized charts displaying data of your choice.
or
Fileread 2.00 for GKrellM2
Then add some script which checks the conditions and feed the result into file.
This solution is a bit awkward so there may be better one...
https://sw.kovidgoyal.net/kitty/
Here's the main site. It's the main terminal I used. I've tried a few (terminator, simple terminal, alacritty, ...I can't remember all the names). I ended up with kitty due to its speed, the fact that it's still maintained, and its support for ligatures.
egrep 'pattern|$' file
or with grep
grep --color -E "pattern|$" file
https://stackoverflow.com/questions/981601/colorized-grep-viewing-the-entire-file-with-highlighting
On old Unix I use a shell function that does something similar
Which flags are those? I'm not seeing them.
And, like I said, they bundle TShark for command line work, so I don't see why they'd enable Wireshark to do the same.
https://www.wireshark.org/docs/wsug_html_chunked/AppToolstshark.html
https://www.wireshark.org/docs/man-pages/tshark.html
edit:
Closest I see is -X
which looks to launch TShark instead of Wireshark.
--print
(like tail
)--immutable
-t
stands for tag search (earlier --title
)-r
stands for regex search (earlier --replace
)Just to provide an alternative to grep, the silver searcher is designed for this problem and supports swift. So you would just do something like,
ag -l --swift MapKit
You should check the sidebar for /r/bash. The website rosettacode.org is also very nice for this. It's a compendium of programs, each written in several languages to act as a Rosetta. Another resource are programming challenge websites. I like codewars.com. O'Rilley has the bash cookbook, which may still be free, and is pretty much exactly what you want. No starch press has a book called wicked cool shell scripts, which is pretty much a collection of shell scripts and explanations of how they work. Maybe that's the most appropriate for what you're asking for.
Also, this isn't more scripts, but the three most valuable resources I've found for bash are this:
BashPitfalls, https://mywiki.wooledge.org/BashPitfalls , a list of common antipatterns in bash; why they are wrong, and how to do it right. Reference this when trying to determine if someone knows their stuff. Many of these mistakes are still taught. In fact, it's like shitty advice about bash has become permanently ingrained in the Internet hive mind, and then institutionalized by trade schools. Really, his entire wiki is gold. Take a look.
Shell Scripts Matter, https://dev.to/thiht/shell-scripts-matter , a short article about approaching shell scripts with the same maturity that you should any other programming project. That means using version control, writing tests, and checking for errors with a static analysis tool. Read this first.
The official gnu bash user manual, which is book length and definitive. Lots of nitpicky details in here. Did you know that function bodies don't need curly braces? Any compound command will do, like a while loop, for example. Oh, and, surprise -- since you didn't quote your delimiter for the here doc you used everything starting with a dollar sign in your string has been replaced with a variable expansion. And, hey, there's this amazing thing called readline.
I took a college class on Linux administration that didn't teach me any of this. What the hell?
Yes!
I don't think it's useful for me to type out my own guide, so look at this one (specifically the suspending jobs part) https://www.digitalocean.com/community/tutorials/how-to-use-bash-s-job-control-to-manage-foreground-and-background-processes
Feel free to ask me any questions if that isn't clear.
There is the Useless Use of Cat Award. Tried to find the origins on newsnet, and this is the oldest I could find.
I would go with Linux...if you're on Windows, you can install Linux into virtual machines with VirtualBox so you don't mess up your main OS. Linux Mint is a good place to start. There's lots of tutorials out there on how to do it, here's one for an example.
From there you can run Linux consoles to your heart's content, if you mess up the OS, just make a new VM.
I found a application that does exactly what you what it to do. But, ain't it dangerous for that autosave?
​
http://mirageiv.sourceforge.net/screenshots.html
​
Just go in the preference to set it up the way you want it.
I’m not sure if I understand your question, but I’m thinking a VPS would do. Maybe check out linode, you can access a terminal via a browser and set up task. You didn’t mention cost so that might be a barrier. Best of luck.
It's written in go: https://golang.org
Getting it go run from commandline is just like any program taking commandline parameters. On Ubuntu it probably run as a service by init.d or systemd: https://en.m.wikipedia.org/wiki/Systemd
I understand well enough what these files are, and this causes non-zero problems. You can read here for details.
Furthermore, there is zero reason to set fish as your default, non-interactive shell. Fish is intended to be used interactively only.
Not really answering your question, and this isn't really the best way to go about answering such a question (searching man
is, for the record), but there's a search engine called SymbolHound which searches for exact, identical occurrences of the search string, including all special characters etc.
I've often found it useful when playing with symbol-intensive programming languages.
FZF should have a default binding to do that already...
ALT-C - cd into the selected directory
Set FZF_ALT_C_COMMAND to override the default command Set FZF_ALT_C_OPTS to pass additional options
So in my case using bash shell, pressing 'esc-c' works as described
i would suggest checking out fzf for this.
the other commentors command will work but if there are miultiple files it will open them all in buffers which might not be what you want. but if you pipe it into fzf thatll let you interactively choose a file from the output of find and then open it in vi - like this:
vi $(find . -name file.txt | fzf)
also look into fd if youre going to use this often, since its significantly faster than find.
I personally prefer to use path-extractor + fzf (https://github.com/edi9999/path-extractor + https://github.com/junegunn/fzf), where the first one is responsible of filtering the pathnames, and fzf for interactive selection. This way, you choose which interactive filter you want to use.
JCL seems to be right, the manual says this:
> dd
accepts the following operands, whose syntax was inspired by the DD (data definition) statement of OS/360 JCL.
I think it is a really interesting idea. I'm keen to do something similar to it my terminal from hell project. Here I'm thinking of a way of attaching additional command line suggestions to bits of output of commands. e.g. the result of git status
could have extra commands associated with the file names like git add foo.txt
which would then tie into a bigger autocomplete system. This could be implemented either command/shell side by running commands through some kind of filter which adds the extra data/annotations/suggestions (via escape codes), or terminal side. I imagine that the definitions or scripts needed could be specified in a language like the one in rat.
I think what you really are trying to figure out is this. This would define if you want a blazing fast and bloat-free C utility with minimum dependencies to navigate your files or stay with a more featured Python utility (I mean ranger here).
I used to use st
but I noticed it was having some performance issues, then I found terminator
and it was faster, it handled unicode characters better than st
, which couldn't display colorful emojis. But recently I made the switch to alacritty and honestly it's really fast. The configuration is easy, it's missing a few features I loved in other terminal emulators but it's getting better. It got the rectangular selection recently which was great for me. If you want to mess with the source code of st
and learn how a terminal emulator works that's great. But if you just want a terminal that works fast I say go for Alacritty.
You will need to use an ssh client to access the server. PuTTY is a popular choice on Windows.
Once you've connected, if no one else is waiting to play you will need to wait for an opponent to connect. Once they do, use the numbers 1-6 on your keyboard to select cards.
When the game is waiting for you to acknowledge something ("Go", "Opponent scored # points", etc.) press Space to continue.
https://asciinema.org/a/1TRlzNNWSHR247RN7VSsvQ2iu
This is the smallest way to recreate it.
#!/usr/bin/env python3 import os import re
line = b'Content-Disposition: form-data; name="file"; filename="../../../../../etc/profile.d/evilscript.sh"' output_dir = "/tmp/tmp"
fn = re.findall(r'Content-Disposition.name="file"; filename="(.)"', line.decode("utf-8", "backslashreplace")) file_name = fn[0] fn = os.path.join(output_dir, file_name) print(fn)
it should output "/tmp/tmp/../../../../../etc/profile.d/evilscript.sh".
You could prevent it by modifying line 144 from
file_name = fn[0]
to
file_name = os.path.basename(fn[0])
I don't want to link my github to my reddit account, so I'll let someone else make an issue.
Not sure what environment your running in but you could try looking in the proc environ if it's Linux and you know the pid.
http://serverfault.com/questions/66363/environment-variables-of-a-running-process-on-unix
Depends on the level you are working at, but this is a whole industry.
I use https://healthchecks.io
So:
0 * * * * /foo/bar/my/script && curl -fsS --retry 3 http://my.montioring.service.com/werafoihj-wfwefw-wefoiuhas
There are tons of services like this. Dead man's snitch is another. WDT.io another...
If you need something you can run yourself, check out nagios or icinga.
Features at a glance:
Babun is my go-to Cygwin distribution when I have use a Windows PC. Cygwin isn't flawless but it's pretty much the most complete option out there.
As an alternative when Cygwin/Babun are having problems, Git-Bash is a good cut down shell with very minimal set of tools (coreutils + vim + git) https://git-for-windows.github.io/
> Guideline 5: One or more options without option-arguments, followed by at most one option that takes an option-argument, should be accepted when grouped behind one '-' delimiter.
It doesn't specify order and guideline 3 allows single numerics.
I'm not sure if optparse is 100% compliant but it also has the very useful feature of being type aware (i.e. --level is an integer, I either get an integer back or an exception if it's invalid), see https://repl.it/NgzK/1 for an example
Emacs is a text editor that can run in the shell. You can browse /r/emacs for workflows and what packages to add. There is packages for pretty much everything, from email to git. cheers
I have also been disappointed by the state of Linux terminal calculators. I wanted something that permitted both command-line mode and an interactive REPL.
A few points:
First bc -l
will set scale to non-zero and load some useful functions, like l() for natural logs. I usually use bc -l.
Second, bc
is just kind of limited.
Third, if you're willing to go with a more-heavyweight option, maxima is first-rate -- if you know Mathematica, it's something like that. You can do, for example, symbolic algebra, like:
$ maxima
Maxima 5.34.1 http://maxima.sourceforge.net using Lisp GNU Common Lisp (GCL) GCL 2.6.12 (a.k.a. GCL) Distributed under the GNU Public License. See the file COPYING. Dedicated to the memory of William Schelter. The function bug_report() provides bug reporting information. (%i1) integrate(x^2, x); 3 x (%o1) -- 3 (%i2)
It can also handle pretty much everything else I'd like. If you know Mathematica syntax and conventions (referring to previous input and outputs with %i3 or %o3 or whatever), it's probably something to look into.
I usually use it from within emacs via maxima-mode, but it can be used separately as well.
C-x * q
to enter a simple calculator, and then hit "1 + 3 ENTER", for example. It's quite a substantial feature, and has a manual here.Turns out you can!
The neomutt manpage (https://neomutt.org/man/neomutt) shows the option -a
. So you can pick the files you need within nnn
and attach them to neomutt.
This is what I tried (in fish shell) to combine ls
with the nnn picker mode:
$ ls -l (nnn -p -) -rw-rw-r-- 1 vaio vaio 14722 Jul 10 07:24 /home/vaio/GitHub/nnn/CHANGELOG -rw-rw-r-- 1 vaio vaio 1472 Jul 7 21:49 /home/vaio/GitHub/nnn/LICENSE -rw-rw-r-- 1 vaio vaio 1697 Jul 10 07:24 /home/vaio/GitHub/nnn/Makefile
Org mode has its own markdown syntax that can do everything you described above, but if you need to export to a markdown file you can do so with the following.
C-c C-e m m (org-md-export-to-markdown)
I used org mode as a referential knowledge base with embedded images and files, text formatting, and even directory links. It's a really powerful tool, but it doesn't use "markdown" because emacs has to be special and have its own markdown. But if you're not opposed to learning a tool I think it would fit your use case.
https://orgmode.org/guide/ This is a pretty good example of what it can do, but if that doesn't sound like your cup of tea I hope you're able to find something!
While this is not a command-line answer, it may actually be a better answer to your question: use If This Then That. (https://ifttt.com) It can do exactly what you describe for free, and a lot more. (unless I'm misunderstanding your requirements)
Are you looking for a BASH cookbook? You might have some luck with free resources googling "BASH cookbook", but there's definitely a book version on Amazon from O'Reily
Answer is here: https://stackoverflow.com/questions/18953499/youtube-api-to-fetch-all-videos-on-a-channel
Use the API to dump list of all uploaded videos. You can then transform it however you want. There is no need for a dedicated program to do this.
Yes that would seriously affect it, as /u/3onyc describes here too, there are differences between tar and gz. I assumed the log files were just gzipped, since that's pretty standard stuff with logrotate
, and tarring the files probably offers only a small compression advantage over gzipping the files individually.
You could probably to mount the tar.gz archives with some fuse-fs tool and just grep in those files. I think I once encountered an implementation for that somewhere, if you're lucky, there's something that can do that in your package manager, google is your friend probably.
There's also a stackoverflow thread about this, which has some decent options.
It's extremely basic, more emphasis on being a puzzle game than learning bash. However, it may help to get some of the essentials down, such as passing arguments. http://www.kongregate.com/games/StudioCime/mu-complex-episode-one
There is a git client for Windows command prompt -- the built-in Windows command-line, not WSL. Download and install this package on Windows like any other program. Now, open a command prompt (Windows-key, 'cmd', Enter). Type "git" and you should get a usage message.
The desktop wallpaper is a registry setting (see here).
use the REG ADD
command to change it from a script. If you do this while explorer.exe is running, you might need to kill it before doing this.
Thanks to the readline
hint, I also found something interesting about synchronzing those buffers with the system clipboard.
https://stackoverflow.com/questions/994563/integrate-readlines-kill-ring-and-the-x11-clipboard
I don't think Microsoft has the same inner workings in this regard. Maybe they implement some POSIX stuff... I'm not sure if this is even related to POSIX.
Anyway this is probably your best bet with Windows.
Ninja Edit: In my experience, it's easiest and best to download the entire Microsoft SysInternals zip file containing all the utilities and just unzip the whole thing into C:\Windows. Then you can run the commands from a Command window without having to mess with the System Path or User Path or whatever. Same goes for the PuTTY utilities that come with PuTTY, I always just dump them into C:\Windows.
Might not be exactly what you're looking for, but it's an interesting read: http://www.useit.com/papers/anti-mac.html
You also might be able to find something relevant in one of the many articles that cite it: http://scholar.google.com/scholar?hl=en&lr=&cites=9003991959462433868&um=1&ie=UTF-8&sa=X&ei=TYuaUKzNNOfIyQGqxIG4AQ&ved=0CDUQzgIwAQ
Yup, GNU pass should be a lot better than this, and by building on GnuPG it unavoidably inherits the problems of both GnuPG and OpenPGP.
> Let's to the command to export our GnuPG keyring to a file
The exported S2K protection is different than than the protection used on the keyring, so you can't infer anything about GnuPG keys at rest unless you're storing them in exported format rather than on your keyring. This changed in GnuPG 2.1, and that's why the S2K options are silently ignored as of GnuPG 2.1. I'm the person who filed the bug report discussed in the video, and the responses to that report are how I learned what's going on. These S2K issues are what originally stopped my use of GnuPG, except for gpgv
(the only component with a sensible architecture) to verify signatures.
That being said, SHA-1 and AES-128 being fast doesn't matter since they're just primitives in the overall S2K scheme designed to be slow (i.e. the S2K iteration count). All the major password-hashing algorithms are built on fast primitives like this, including PBKDF2, scrypt, and Argon2. Also, SHA-1 is still safe as a primitive for password hashing since none of its weaknesses apply. A new application shouldn't choose it, but existing applications aren't broken or at risk for continuing to use it.
Been using it on my home router:
https://openwrt.org/docs/guide-user/services/network_monitoring/bwmon
(Wait wtf is bwmon?)
Edit: Okay so bwm-ng is bmon with disk io monitoring added in. I guess it checks for bottlenecks with downloads and network shares.
Sweet. Now, to link a page that produces a random setence from the database.
It'll work nicely with this page http://stoney.sb.org/eno/oblique.html
, but I'm not sure how to tell a program to read only the content in the h3 tag.
Do you think there would be a sane way to pick quotes off this page? https://en.wikiquote.org/wiki/Richard_Stallman
look into getting fusion, parallels or freebie virtualbox and install a copy of linux (i'd recommend ubuntu or mint if you're just starting out) into that on your mac. it'll run fine and you can compare differences live if you want. when you're feeling more advanced install debian, arch, or gentoo. good luck!