This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Const SSH_SERVER_LOG = "/var/log/rdp/audit.log" | |
Const LOCAL_RDP_GROUP = "Remote Desktop Users" | |
Const CACHE_AGE_IN_MINUTES = 5 | |
Const DENY_USERS = "Administrator|Administrador|Admin|Admin1|POS|User|UsUser1|system|sys|aspnet|root|sql|post|post1|bank|operator|oper|oper1|test|test1" | |
Const NOLOG_USERS = "VDC02" | |
If Not WScript.Arguments.Named.Exists("s") Then | |
WScript.echo "usage: " & WScript.ScriptName & " /s:server /l:user /i:key_file" | |
WScript.Quit 1 | |
End if |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Explicit | |
Private Const LOCALE_SYSTEM_DEFAULT As Long = &H800 | |
Private Const S_OK As Long = 0 | |
Private Type DISPPARAMS | |
rgPointerToVariantArray As Long | |
rgPointerToLongNamedArgs As Long | |
cArgs As Long | |
cNamedArgs As Long |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
for /f "tokens=1-2 delims=|" %%i in ('cscript //nologo bitrate.vbs /f:"%~1" /m:"%~2"') do ( | |
if %%j LSS 320 echo %%i has bitrate %%j and will be deleted | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
see https://gist.github.com/wqweto/e92dce63a68cd3ff9ca91b053b9510c9 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
USE [master] | |
GO | |
IF OBJECT_ID('dbo.sp_foreachdb') IS NULL EXEC ('CREATE PROCEDURE dbo.sp_foreachdb AS RETURN 0') | |
GO | |
ALTER PROCEDURE dbo.sp_foreachdb ( | |
@command NVARCHAR(MAX), | |
@replace_character NCHAR(1) = N'?', | |
@print_dbname BIT = 0, | |
@print_command_only BIT = 0, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class CsvExtensions | |
{ | |
// | |
// sample usage: | |
// | |
// var list = new object[] { | |
// new { Email = "[email protected]", Name = "Свет.а Х,истова", UnsubscribeToken = "12\r34" }, | |
// new { Email = "test", Name = "11\"22", UnsubscribeToken = "5\n67" }, | |
// }; | |
// var csv = string.Join(Environment.NewLine, list.ToCsvTable()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Attribute VB_Name = "Module1" | |
Option Explicit | |
'--- for GetRawInputDeviceInfo | |
Private Const RIDI_DEVICENAME As Long = &H20000007 | |
Private Const RIM_TYPEKEYBOARD As Long = 1 | |
'--- for setupapi | |
Private Const DIGCF_PRESENT As Long = &H2 | |
Private Const DIGCF_ALLCLASSES As Long = &H4 | |
Private Const DIGCF_PROFILE As Long = &H8 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- $Id: re.lua,v 1.44 2013/03/26 20:11:40 roberto Exp $ | |
-- imported functions and modules | |
local tonumber, type, print, error = tonumber, type, print, error | |
local setmetatable = setmetatable | |
local m = require"lpeg" | |
-- 'm' will be used to parse expressions, and 'mm' will be used to | |
-- create expressions; that is, 're' runs on 'm', creating patterns | |
-- on 'mm' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- This transpiler generates Lua source code from input brainf**k program, then compiles and | |
-- executes this Lua source code. Can be used with LuaJIT for jitted brainf**k experience. | |
-- | |
-- Based on https://github.com/prapin/LuaBrainFuck/blob/master/brainfuck.lua | |
-- Inspired by https://github.com/luapower/bf and its dynasm implementation (~5-10x faster) | |
-- Optimizations from https://www.nayuki.io/page/optimizing-brainfuck-compiler | |
-- | |
-- Optimizations due to lpeg grammar: | |
-- instead of generating repeating `i = i + 1` just output `i = i + N` | |
-- instead of generating repeating `t[i] = t[i] + 1` just output `t[i] = t[i] + N` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--local strict = require"strict" | |
local function permutations(t) | |
local fn = coroutine.yield | |
local function permgen(t, n) | |
for i = 1, n do | |
t[n], t[i] = t[i], t[n] | |
if n == 1 then | |
fn(t) | |
else |