start new:
tmux
start new with session name:
tmux new -s myname
| #!/usr/bin/awk -f | |
| # Convert the "svn log" output into a one liner format, which is easier to grep | |
| # or use in scripts. Pipe "svn log" into this script | |
| # When we get a line that starts with a revision number, put the data in variables | |
| /^r[0-9]+/ { | |
| rev=$1 | |
| user=$3 | |
| date=$5 |
| set langmap=ёйцукенгшщзхъфывапролджэячсмитьбюЁЙЦУКЕНГШЩЗХЪФЫВАПРОЛДЖЭЯЧСМИТЬБЮ;`qwertyuiop[]asdfghjkl\\;'zxcvbnm\\,.~QWERTYUIOP{}ASDFGHJKL:\\"ZXCVBNM<> | |
| nmap Ж : | |
| " yank | |
| nmap Н Y | |
| nmap з p | |
| nmap ф a | |
| nmap щ o | |
| nmap г u | |
| nmap З P |
| <?xml version="1.0"?> | |
| <!DOCTYPE fontconfig SYSTEM "fonts.dtd"> | |
| <fontconfig> | |
| <!-- | |
| Documented at | |
| http://linux.die.net/man/5/fonts-conf | |
| To check font mapping run the command at terminal | |
| $ fc-match 'helvetica Neue' |
| import java.io.ByteArrayOutputStream; | |
| import java.io.OutputStream; | |
| import java.io.PrintStream; | |
| import org.slf4j.Logger; | |
| public class LoggingOutputStream extends OutputStream { | |
| public static void redirectSysOutAndSysErr(Logger logger) { | |
| System.setOut(new PrintStream(new LoggingOutputStream(logger, LogLevel.INFO))); |
| This gist includes components of a oozie workflow - scripts/code, sample data | |
| and commands; Oozie actions covered: shell action, email action | |
| Action 1: The shell action executes a shell script that does a line count for files in a | |
| glob provided, and writes the line count to standard output | |
| Action 2: The email action emails the output of action 1 | |
| Pictorial overview of job: | |
| -------------------------- |
| func openbrowser(url string) { | |
| var err error | |
| switch runtime.GOOS { | |
| case "linux": | |
| err = exec.Command("xdg-open", url).Start() | |
| case "windows": | |
| err = exec.Command("rundll32", "url.dll,FileProtocolHandler", url).Start() | |
| case "darwin": | |
| err = exec.Command("open", url).Start() |
| 1) Download cntlm rpm package from http://sourceforge.net/projects/cntlm/files/cntlm/ | |
| 2) Login as root | |
| 3) Run command: | |
| $ rpm -ivh cntlm-*.rpm | |
| 4a) Obtain password hash for the configuration file in step 4b (do not put plaintext password in configuration) | |
| $ cntlm -H -d <domain> -u <username> |
/etc/yum.repos.d/):sudo dnf localinstall --nogpgcheck http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpmsudo dnf install -y freetype-freeworld| #!/usr/bin/env bash | |
| # install docker | |
| # https://docs.docker.com/engine/installation/linux/ubuntulinux/ | |
| # install docker-compose | |
| # https://docs.docker.com/compose/install/ | |
| # install letsencrypt | |
| # https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-16-04 |