To add code
to PATH in macOS (in order to run code from the command line) we may to open up VS Code and open the 'Command Palette' with Shift+Command+P on Mac, or Shift+Control+P on Linux. In it, enter shell command and look for the Shell Command: Install 'code' command in PATH option. After doing this any new shell we open should be able to run code.
sudo useradd --system --shell /bin/false node_exporter
curl -fsSL https://github.com/prometheus/node_exporter/releases/download/v1.3.1/node_exporter-1.3.1.linux-amd64.tar.gz \
| sudo tar -zxvf - -C /usr/local/bin --strip-components=1 node_exporter-1.3.1.linux-amd64/node_exporter \
&& sudo chown node_exporter:node_exporter /usr/local/bin/node_exporter
If you to run into this problem change the console encoder to utf-8
before starting python
chcp 65001
set PYTHONIOENCODING=utf-8
/* | |
* scriptcs -install Newtonsoft.Json | |
* scriptcs -install CommandLineParser | |
*/ | |
using System.Net; | |
using Newtonsoft.Json; | |
using Newtonsoft.Json.Linq; |
package main | |
import ( | |
"bytes" | |
"encoding/binary" | |
"fmt" | |
"os" | |
"syscall" | |
"unsafe" |
I've recently looked into how core.longpaths
Git options works and how it's related to Enable Win32 long paths Windows option. Turns out they are not related, and longpaths is both clever and hacky.
Many Windows wide char APIs support longer than MAX_PATH
paths through the
file namespace prefix (\\?\
or \\?\UNC\
) followed by an absolute path. When long paths support is enabled via 'core.longpaths' option, handle_long_path function expands long paths using the '\?' file namespace prefix. See this commit message for detailed explantion.
open powershell | |
wsl -d docker-desktop | |
echo "vm.max_map_count = 262144" > /etc/sysctl.d/99-docker-desktop.conf | |
Restart docker-desktop |
JDBC client sends command to setup session when physical connection is established via a modified AUTH_ALTER_SESSION OCI attribute in the authentication phase.
If the JVM time zone is one of the magic constants in the oracle.sql.ZONEIDMAP
class and oracle.jdbc.timezoneAsRegion = true
(default) then AUTH_ALTER_SESSION looks like this (where Etc/UTC
is the default timezone picked up by the JVM)
ALTER SESSION SET TIME_ZONE='Etc/UTC' NLS_LANGUAGE='POLISH' NLS_TERRITORY='POLAND'
which can fail with
https://www.asus.com/support/FAQ/1048887/ |
/* | |
* Be beware http://stackoverflow.com/questions/4203646/system-console-returns-null | |
*/ | |
public static void waitForEnter(String message, Object... args) { | |
Console c = System.console(); | |
if (c != null) { | |
// printf-like arguments | |
if (message != null) | |
c.format(message, args); | |
c.format("\nPress ENTER to proceed.\n"); |