| Key | Result |
|---|---|
v |
select |
y |
copy (yank) |
c |
change |
d |
delete |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- Minimal configuration file for Neovim | |
| -- Check if needed commands are available | |
| local function is_command_available(cmd) | |
| -- os.execute returns true (or exit code 0) if the command exists | |
| local result = os.execute('command -v ' .. cmd .. ' >/dev/null 2>&1') | |
| -- Lua 5.2+ returns true on success, or nil/false on failure | |
| -- Lua 5.1 returns status code shifted left (e.g., 0 = success) | |
| if result == true or result == 0 then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/awk -f | |
| # This program is a copy of guff, a plot device. https://github.com/silentbicycle/guff | |
| # My copy here is written in awk instead of C, has no compelling benefit. | |
| # Public domain. @thingskatedid | |
| # Run as awk -v x=xyz ... or env variables for stuff? | |
| # Assumptions: the data is evenly spaced along the x-axis | |
| # TODO: moving average |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * John Conway's Game of Life. | |
| * | |
| * This is written for POSIX, using Curses. Resizing of the terminal is not | |
| * supported. | |
| * | |
| * By convention in this program, x is the horizontal coordinate and y is | |
| * vertical. There correspond to the width and height respectively. | |
| * The current generation number is illustrated when show_generation is set. | |
| * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #define _GNU_SOURCE | |
| #include <assert.h> | |
| #include <dlfcn.h> | |
| #include <fcntl.h> | |
| #include <string.h> | |
| #include <stdarg.h> | |
| #include <stdint.h> | |
| #include <stdio.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This may be runnable as a script, but keep in mind -y is not always acknowledged. | |
| # These are the drop dead basics | |
| pkg -y install vim | |
| pkg -y install git | |
| pkg -y install chromium | |
| pkg -y install gimp | |
| pkg -y install sudo | |
| # Install Rust |
This script is modeled after tee (see [man tee][2]) and works on Linux, macOS, Cygwin, WSL/WSL2
It's like your normal copy and paste commands, but unified and able to sense when you want it to be chainable.
This project started as an answer to the StackOverflow question: [How can I copy the output of a command directly into my clipboard?][3]
#Unix Toolbox
This document is a collection of Unix/Linux/BSD commands and tasks which are useful for IT work or for advanced users. This is a practical guide with concise explanations, however the reader is supposed to know what s/he is doing.
##Unix Toolbox revision 14.4
The latest version of this document can be found at http://cb.vu/unixtoolbox.xhtml. Replace .xhtml on the link with .pdf for the PDF version and with .book.pdf for the booklet version. On a duplex printer the booklet will create a small book ready to bind. This XHTML page can be converted into a nice PDF document with a CSS3 compliant application (see the script example). See also the about page.
Error reports and comments are m
Error reports and comments are m
Locate the section for your github remote in the .git/config file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git@github.com:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this: