(C-x means ctrl+x, M-x means alt+x)
The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf
:
main(argc, argv) | |
int argc; | |
char *argv[]; | |
{ | |
int i; | |
argc--; | |
for(i=1; i<=argc; i++) | |
printf("%s%c", argv[i], i==argc? '\n': ' '); | |
} |
default: | |
cc ccsmtp.c -o ccsmtpd -lpthread |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
#define _XOPEN_SOURCE 700 | |
#include <signal.h> | |
#include <unistd.h> | |
int main() | |
{ | |
sigset_t set; | |
int status; | |
if (getpid() != 1) return 1; |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <netdb.h> /* gethostbyname */ | |
#include <netinet/in.h> /* htons */ | |
#include <sys/socket.h> | |
#include <sys/types.h> | |
Orthodox C++ (sometimes referred as C+) is minimal subset of C++ that improves C, but avoids all unnecessary things from so called Modern C++. It's exactly opposite of what Modern C++ suppose to be.
#!/bin/bash | |
#no PATH, no way to accidently run any programs | |
PATH='' | |
#useful variables | |
term_height=0 | |
term_width=0 | |
term_scroll_height=0 | |
status_line_row=0 |
# Config that is very close to a i3 window manager's keybinding. | |
set -s escape-time 0 | |
setw -g aggressive-resize on | |
# First remove *all* keybindings | |
unbind-key -a | |
# List keys | |
bind-key ? list-keys |
It is possible to redirect some input to TTY device by standard IO redirection.
echo ahoj > /dev/tty1
Such redirection will however end in the output buffer of the TTY device so the characters will be ghosts - visible on the terminal, but not effective. It is, in fact, not possible by standard tools to redirect input to terminal as if it is a real input from keyboard.