gpg --no-default-keyring --keyring skype-stable.gpg --keyserver keyserver.ubuntu.com --recv-keys 1F3045A5DF7587C3
gpg --no-default-keyring --keyring $HOME/.gnupg/skype-stable.gpg --export > ./skypeforlinux-keyring.gpg
function Convert-ChatSessionToJson { | |
param ( | |
[string]$Filename = "chat.json" | |
) | |
$data = Get-Content -Path $Filename | ConvertFrom-Json | |
$outputFilename = "$Filename.md" | |
$empty = $true | |
$data.requests | ForEach-Object { |
function Get-VPNConnectionInfo { | |
$connectedVPN = $false | |
try { | |
# Read the list of known VPN providers from a JSON file | |
if (Test-Path -Path "./knownVPNproviders.json") { | |
$knownVPNProviders = Get-Content -Path "./knownVPNproviders.json" | ConvertFrom-Json | |
} | |
else { | |
Write-Warning "Warning: The file 'knownVPNproviders.json' was not found." | |
$knownVPNProviders = @() |
# work but badly way | |
gitea() { | |
reponame="basename -s .git $(git config --get remote.origin.url)" | |
giteaargs="$@" | |
tea $giteaargs --repo $reponame | |
} | |
PROG2=gitea | |
_cli_bash_autocomplete() { |
export default function Page() { | |
const [token, setToken] = useState(''); | |
// function that do post request to get token from backend localhost:8000/api/v1/users/token using axios and post method body email and password | |
function handToken() { | |
try { | |
const data = { | |
email: 'prostome2@prosto.me', | |
password: '222', |
# Step 1: Remove the Firefox Snap by running the following command in a new Terminal window: | |
sudo snap remove firefox | |
# Step 2: Add the (Ubuntu) Mozilla team PPA to your list of software sources by running the following command in the same Terminal window: | |
sudo add-apt-repository ppa:mozillateam/ppa | |
# Step 3: Next, alter the Firefox package priority to ensure the PPA/deb/apt version of Firefox is preferred. This can be done using a slither of code from FosTips (copy and paste it whole, not line by line): | |
echo ' |
function get-history { | |
if ($args.Count -gt 0) { | |
Write-Output "$args" | |
$search="$($args[0])" | |
Get-Content (Get-PSReadlineOption).HistorySavePath | ? { $_ -Like "*$($search)*" } | |
} | |
Write-Output 'get-history acts like history' | |
Write-Output "$args" | |
} |
## Setup | |
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg | |
sudo install -o root -g root -m 644 microsoft.gpg /usr/share/keyrings/ | |
sudo sh -c 'echo "deb [arch=amd64 signed-by=/usr/share/keyrings/microsoft.gpg] https://packages.microsoft.com/repos/edge stable main" > /etc/apt/sources.list.d/microsoft-edge-beta.list' | |
sudo rm microsoft.gpg | |
## Install | |
sudo apt update | |
sudo apt install microsoft-edge-beta |
gpg --no-default-keyring --keyring skype-stable.gpg --keyserver keyserver.ubuntu.com --recv-keys 1F3045A5DF7587C3
gpg --no-default-keyring --keyring $HOME/.gnupg/skype-stable.gpg --export > ./skypeforlinux-keyring.gpg
function Test-IsAdmin { | |
try { | |
$identity = [Security.Principal.WindowsIdentity]::GetCurrent() | |
$principal = New-Object Security.Principal.WindowsPrincipal -ArgumentList $identity | |
return $principal.IsInRole( [Security.Principal.WindowsBuiltInRole]::Administrator ) | |
} | |
catch { | |
throw "Failed to determine if the current user has elevated privileges. The error was: '{0}'." -f $_ | |
} | |
return false |