Display a line of text/string on standard output or a file.
echo [Options] [Strings]
| { | |
| "log": { | |
| "loglevel": "warning" | |
| }, | |
| "routing": { | |
| "domainStrategy": "IPIfNonMatch", | |
| "rules": [ | |
| { | |
| "type": "field", | |
| "ip": [ |
Install Termux, an Android terminal emulator that provides a Linux execution environment and various tools.
Update system packages in Termux:
$ pkg update -y
This is a simple setup for reflectionless logging with serilog using caller information (and a single static class).
See also https://stackoverflow.com/a/46905798
Create your own Log.cs in your Root-Namespace (you can use the class below).
This class is required to detect where the call is coming from; it uses Caller-Information to speed up the program execution, because the attributes are resolved at compile-time.
| @echo off | |
| setlocal | |
| call :setESC | |
| cls | |
| echo %ESC%[101;93m STYLES %ESC%[0m | |
| echo ^<ESC^>[0m %ESC%[0mReset%ESC%[0m | |
| echo ^<ESC^>[1m %ESC%[1mBold%ESC%[0m | |
| echo ^<ESC^>[4m %ESC%[4mUnderline%ESC%[0m |
| $ ffmpeg -i input.mp4 -vcodec h264 -acodec mp2 output.mp4 |
| public class Crc16 { | |
| public static void main(String... a) { | |
| byte[] bytes = new byte[] { (byte) 0x08, (byte) 0x68, (byte) 0x14, (byte) 0x93, (byte) 0x01, (byte) 0x00, | |
| (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x06, (byte) 0x00, (byte) 0x00, (byte) 0x01, | |
| (byte) 0x00, (byte) 0x13, (byte) 0x50, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x22, (byte) 0x09, | |
| (byte) 0x11 }; | |
| byte[] byteStr = new byte[4]; | |
| Integer crcRes = new Crc16().calculate_crc(bytes); | |
| System.out.println(Integer.toHexString(crcRes)); |