- Quick and easy VPN setup using OpenVPN Docker image, on Amazon Linux 2023.
This file contains 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
###################################################### | |
# SET YOUR PARAMETERS | |
$SAWResourceGroupName = 'saw_resource_group' | |
$SAWLocation = 'AustraliaEast' | |
$SAWHostPoolName = 'saw_host_pool' | |
$SAWWorkspaceName = 'saw_workspace' | |
$SAWAppGroupName = 'saw_app_group' | |
$SAWUserGroupName = 'saw_user_group' | |
$SAWVDIGroupRole = 'Desktop Virtualization User' | |
$SAWAppGroupResourceType = 'Microsoft.DesktopVirtualization/applicationGroups' |
This file contains 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
# Set exit on error | |
$ErrorActionPreference = 'Stop' | |
# Show list of AWS profiles configured on the system with numbered selection then prompt for selection and set the $AWS_PROFILE variable to the corresponding profile name, not the profile number | |
$AWS_PROFILES = aws configure list-profiles | |
$AWS_PROFILES | ForEach-Object -Begin { $i = 1 } -Process { Write-Host "$i. $_"; $i++ } | |
$AWS_PROFILE = Read-Host "Select AWS Profile Number" | |
$AWS_PROFILE = $AWS_PROFILES[$AWS_PROFILE - 1] | |
write-host "You selected $AWS_PROFILE" | |
$PULL_DATE = Get-Date -Format "yyyyMMdd" |
This file contains 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
# github.com cloner | |
# Usage: github_cloner.ps1 <ORG_NAME> <github_username> <github_personal_accesstoken> | |
# E.g.: github_cloner.ps1 SecurityShift markz0r ghp_BzuLHDiU6dfsqwfau0Njxiy | |
# Personal access tokens: https://github.com/settings/tokens | |
$ErrorActionPreference = "Stop" | |
$User = $args[1] | |
$Token = $args[2] | |
$orgName = "https://api.github.com/orgs/$args[0]/repos?per_page=100" | |
$INPUT_FILE=".\github_repos.txt" | |
$base64AuthInfo = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes("$($User):$($Token)")) |
This file contains 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
# github.com lister | |
# Usage: github_lister.ps1 <ORG_NAME> <github_username> <github_personal_accesstoken> | |
# E.g.: github_lister.ps1 SecurityShift markz0r ghp_BzuLHDiU6dfsqwfau0Njxiy | |
# Personal access tokens: https://github.com/settings/tokens | |
$ErrorActionPreference = "Stop" | |
$User = $args[1] | |
$Token = $args[2] | |
$orgName = "https://api.github.com/orgs/$args[0]/repos?per_page=100" | |
$OUTPUT_FILE=".\github_repos.txt" | |
$base64AuthInfo = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes("$($User):$($Token)")) |
This file contains 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
#!/bin/bash | |
# chain_collector.sh [domain] [port] | |
# output to stdout | |
if [ $# -ne 2 ]; then | |
echo "USAGE: chain_collector.sh [domain] [port]" | |
exit 1 | |
fi | |
SOURCE="${BASH_SOURCE[0]}" |
This file contains 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 java.util.Scanner; | |
public class PrFa { | |
public static void main(String args[]){ | |
int number; | |
Scanner sc = new Scanner(System.in); | |
System.out.println("Enter a number ::"); | |
number = sc.nextInt(); | |
for(int i = 2; i< number; i++) { |
This file contains 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 java.util.Scanner; | |
public class PrFa { | |
public static void main(String args[]){ | |
int number; | |
Scanner sc = new Scanner(System.in); | |
System.out.println("Enter a number ::"); | |
number = sc.nextInt(); | |
for(int i = 2; i< number; i++) { |
This file contains 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
#!/usr/bin/python | |
def pt(n): | |
trow = [1] | |
y = [0] | |
for x in range(max(n,0)): | |
print(trow) | |
trow=[l+r for l,r in zip(trow+y, y+trow)] | |
return n>=1 | |
pt(5) |
This file contains 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
number=$1 | |
i=$2 | |
f=0 | |
while [[ $i -le `expr $number / 2` ]]; do | |
if test `expr $number % $i` -eq 0 | |
then | |
f=1 | |
fi | |
i=`expr $i + 1` |
NewerOlder