Skip to content

Instantly share code, notes, and snippets.

@numbnet
numbnet / .bashrc
Last active February 25, 2021 12:58
Unix
### *** --- .bashrc --- *** ##
function bashRCAlias() {
## =======================≠=============
## Aliases
## ======================≠==============
alias ls="ls -a"
alias cp="cp -i"
alias rm="rm -rf"
alias mv="mv -i"
##=== OpenSSH Win10 ===
echo "----------- !!! START !!! ----------"
## ================= ≠≠≠ =================
param([switch]$Elevated)
function TestAdmin {
$currentUser = New-Object Security.Principal.WindowsPrincipal $([Security.Principal.WindowsIdentity]::GetCurrent())
$currentUser.IsInRole([Security.Principal.WindowsBuiltinRole]::Administrator)
@numbnet
numbnet / install.Asterisk
Created December 10, 2020 14:09
InstallAPP.Centos
#

=============== Менеджер пакетов WinGet в Windows 10 ===============

############## VARIANT 1 Installer: ##############

### с помощью PowerShell скачать appxbundle файл winget с GitHub и установить его (https://github.com/microsoft/winget-cli/releases):

mkdir "C:\PS" Invoke-WebRequest -Uri "https://github.com/numbnet/Win10andAppx/blob/numbnet/WinModules/winget-cli/releases/download/v0.2.3162-preview/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.appxbundle" -OutFile "C:\PS\WinGet.appxbundle" Add-AppxPackage "C:\PS\WinGet.appxbundle"

##===========================================================================

установка winget в windows 10 из appxbundle:

@numbnet
numbnet / Debloat-Windows10.ps1
Created December 1, 2020 13:04
Windows scripts
<#
NAME
Debloat-Windows10.ps1
DESCRIPTION
Debloats and customizes Windows 10 Enterprise N LTSB.
It changes your privacy options in the settings app and disables scheduled tasks and services that are there
to gather information about you. It also tweaks the registry to customize settings, make your font display properly
on DPI scaling 125% and disable OneDrive completely. Windows Features are also disabled, such as Internet Explorer
and XPS Viewer, while others are enabled such as .NET framework 3.5. On top of it all, it appends new lines to your
hosts file that block Microsoft from collecting data on you, as well as enables or disables local policies to
@numbnet
numbnet / %pre
Last active November 27, 2020 15:26
kickstart
%pre
#!/bin/sh
hds=""
mymedia=""
for file in /proc/ide/h*
do
mymedia=`cat $file/media`
@numbnet
numbnet / centos.utils.sh
Last active December 24, 2020 13:47
Examples
#!/bin/bash
ver="v1.9.2"
title="Breeze Easy Shell"
title_full="$title $ver"
echo "$title_full"
#-----------------
#типовые функции
#-----------------
#для рабты с цветами
@numbnet
numbnet / SSH.ed25519.sh
Last active November 25, 2020 11:01
SSH
#!/bin/bash
#====== SSH.ed25519.sh =======#
function variable {
# NKEY='id'
# CKEY='mail@gmail.com'
PKEY="";
# TKEY=rsa;
# TKEY=dsa;
@numbnet
numbnet / Backup.sh
Last active February 25, 2021 13:00
backup
#!/bin/bash
function BACKUPMENU {
echo "******* -select- *******"
echo "**************************"
echo " 1) = Backup with RESTIC "
echo " 2) = RESTORE with RESTIC"
echo " 3) = BACKUP with TAR "
echo " 4) = RESTORE with TAR "
echo " *) = EXIT "
echo "**************************"