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
fping -g 192.168.0.0/24 2>nul | Select-String -SimpleMatch -Pattern "is alive" | Select-Object @{Name=“IP”;Expression={($_ -split " ")[0]}} | Select-Object IP,@{Name=“D”;Expression={[int]($_.IP -split "\.")[3]}} | Sort-Object -Property D| Select-Object -Property IP |
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
Stop-Service wuauserv | |
Set-Service -Name wuauserv -StartupType disabled | |
$NewAcl = Get-Acl -Path "C:\WINDOWS\system32\wuaueng.dll" | |
Set properties | |
#$identity = "BUILTIN\Administrators" | |
$identity = "Администраторы" | |
$fileSystemRights = "FullControl" | |
$type = "Allow" | |
$fileSystemAccessRuleArgumentList = $identity, $fileSystemRights, $type |
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
// srcs: | |
// https://forum.mista.ru/topic.php?id=837711 | |
// https://fastcode.im/Templates/7861 | |
// Добавляет один сформированный табличный документ к другому | |
// | |
// Параметры: |
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
import time | |
import statistics | |
import functools | |
def bench(num_iters = 1000): | |
def make_wrapper(func): | |
@functools.wraps(func) | |
def wrapper(*args, **kw): | |
times = [] |
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
import hashlib | |
import logging | |
import os | |
import uuid | |
from dataclasses import dataclass, field | |
from typing import Optional, Dict, Union | |
from spyne import Application, rpc, ServiceBase, Unicode, Boolean, Integer | |
from spyne.protocol.soap import Soap11 | |
from spyne.server.wsgi import WsgiApplication |
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
#cloud-config | |
autoinstall: | |
version: 1 | |
interactive-sections: | |
- network | |
- storage | |
locale: "ru_RU.UTF-8" | |
keyboard: | |
layout: us,ru | |
toggle: alt_shift_toggle |
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
extern crate data_encoding; | |
extern crate memmap; | |
use data_encoding::HEXUPPER; | |
use memmap::{Mmap, MmapMut}; | |
use std::fs; | |
use std::fs::{File, OpenOptions}; | |
use std::ops::{Deref, DerefMut}; | |
struct BytesPattern { |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
# перед созданием лучше отключить политику "Пароль должен отвечать требованиям сложности" | |
# в gpedit.msc а потом включить | |
$group_Users = Get-LocalGroup -Name "Пользователи" | |
$group_RDP = Get-LocalGroup -Name "Пользователи удаленного рабочего стола" | |
function CreateUser ($Username, $Password) { | |
$sec_passwd = ConvertTo-SecureString -String $Password -AsPlainText -Force | |
return New-LocalUser -Name $Username -AccountNeverExpires -Description $Username -FullName $Username -Password $sec_passwd -PasswordNeverExpires | |
} |
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
import os | |
import shutil | |
import sys | |
import tempfile | |
import tkinter as tk | |
from tkinter import filedialog | |
from tkinter import messagebox | |
from xml.sax import make_parser | |
from xml.sax.saxutils import XMLFilterBase, XMLGenerator | |
from zipfile import ZipFile, is_zipfile |