Create line in sudo visudo (at WSL to prevent asking password):
%sudo ALL=(ALL) NOPASSWD: /usr/sbin/service docker start
Add in ~/.bashrc
# Start Docker daemon automatically when logging in if not running.
$groups = Get-ADGroup -Filter * | |
$result = @() | |
foreach ( $group in $groups ) { | |
$object = Get-ADObject ` | |
-Identity $group.DistinguishedName ` | |
-Properties managedBy | |
if ( $object.managedBy -ne $null ) { | |
$managedBy = Get-ADUser -Filter "DistinguishedName -eq '$($object.managedBy)'" |
# Задание имени журнала событий, из которого будем получать данные. | |
$LogName = 'Microsoft-Windows-TerminalServices-LocalSessionManager/Operational' | |
# Имя пользователя, для которого не будем обрабатывать события. | |
$ExcludedUsername = "DOMAIN\username" | |
# Имя компьютера, с которого получаем события. | |
$ComputerName = "localhost" | |
# Определение функции IP2Name для преобразования IP-адреса в имя хоста с помощью Resolve-DnsName. |
import React, { createContext, useContext } from 'react'; | |
// Создаем контекст со значением по умолчанию "default" | |
const MyContext = createContext('default'); | |
// Создаем компонент, который получает значение контекста и отображает его в диве | |
function MyComponent() { | |
const value = useContext(MyContext); | |
return <div>{value}</div>; | |
} |
git config --global user.name "Mikhail Danshin" | |
git config --global user.email mdanshin@gmail.com | |
git init | |
git checkout -b main #In October 2020, GitHub has changed its naming convention for the default branch from master to main. | |
git remote add origin https://gitlab.danshin.ms/mdanshin/cicd-test.git | |
git add . | |
git commit -m "Initial commit" | |
git -c http.sslVerify=false push -u origin main |
Create line in sudo visudo (at WSL to prevent asking password):
%sudo ALL=(ALL) NOPASSWD: /usr/sbin/service docker start
Add in ~/.bashrc
# Start Docker daemon automatically when logging in if not running.
import EventEmitter from "events"; | |
class Service { | |
getAllUsers() { | |
let search = function () { | |
return new Promise((resolve, reject) => { | |
let arr = [] | |
const myEmitter = new EventEmitter() | |
myEmitter.on("event", () => { | |
arr.push(1,2,4,8) |
sidToString(base64) { | |
const buffer = Buffer.from(base64, 'base64') | |
const array = buffer.toString('hex') | |
const G = array.toString().match(/.{1,2}/g) | |
const BESA2=`${G[8]}${G[9]}${G[10]}${G[11]}` | |
const BESA3=`${G[12]}${G[13]}${G[14]}${G[15]}` | |
const BESA4=`${G[16]}${G[17]}${G[18]}${G[19]}` | |
const BESA5=`${G[20]}${G[21]}${G[22]}${G[23]}` | |
const BERID=`${G[24]}${G[25]}${G[26]}${G[27]}` |
PORT=5000 |
import React, {useState} from "react"; | |
export default function Create() { | |
const [state, setState] = useState() | |
function changeHandler(event) { | |
const {name, value} = event.target | |
setState(prevState => ({ | |
...prevState, |