Javascript is dynamically typed language (same as Python) with C/C++ compaterble syntax that look at the same for Java and C# also
let trueValue = true
let falseValue = falsetrueValue = True| /* | |
| AlwaysOn Availability Group Error Events | |
| ======================================== | |
| Author: Eitan Blumin | |
| Date: 2020-05-31 | |
| This alert check the contents of the AlwaysOn_Health extended events session for data suspension, role changes, and other errors. | |
| For more info: | |
| https://docs.microsoft.com/sql/database-engine/availability-groups/windows/always-on-extended-events | |
| */ |
| <# | |
| .SYNOPSIS | |
| This Powershell script updates the security descriptor for scheduled tasks so that any user can run the task. | |
| Version 1.0 of this script only displays tasks in the root folder. I want to make sure that works first. | |
| .DESCRIPTION | |
| Earlier versions of Windows apparently used file permissions on C:\Windows\System32\Tasks files to manage security. | |
| Windows now uses the SD value on tasks under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree to accomplish that. |
| Set Args = Wscript.Arguments | |
| source = Args(0) | |
| target = Args(1) | |
| tempDir = Empty | |
| Function GetFullPath(path) | |
| Dim fso | |
| Set fso = CreateObject("Scripting.FileSystemObject") | |
| GetFullPath = fso.GetAbsolutePathName( path ) | |
| End Function |
| Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue | |
| function Update-LastLogonTimestamp | |
| { | |
| [CmdletBinding()] | |
| param | |
| ( | |
| [parameter(Position=0, Mandatory=$true)][string]$UserName | |
| ) |
| Windows Registry Editor Version 5.00 | |
| [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout] | |
| "Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,5b,e0,3a,00,00,00,00,00 |
| import os | |
| import re | |
| import sys | |
| import json | |
| import base64 | |
| import sqlite3 | |
| import win32crypt | |
| import shutil | |
| from Cryptodome.Cipher import AES |
| title | author | date | source | notoc |
|---|---|---|---|---|
LDAP Search Filter Cheatsheet |
Jon LaBelle |
January 4, 2021 |
true |
| # install haproxy | |
| yum install -y haproxy | |
| # config haproxy for rabbitmq | |
| cat > /etc/haproxy/haproxy.cfg << "EOF" | |
| global | |
| log 127.0.0.1 local0 notice | |
| maxconn 10000 | |
| user haproxy |
| http { | |
| log_format bodylog '$remote_addr - $remote_user [$time_local] ' | |
| '"$request" $status $body_bytes_sent ' | |
| '"$http_referer" "$http_user_agent" $request_time ' | |
| '<"$request_body" >"$resp_body"'; | |
| lua_need_request_body on; | |
| set $resp_body ""; | |
| body_filter_by_lua ' |