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
# Author: Robert Lambert | |
# OS: Windows | |
# Creation: 2023 | |
# Configuration variable names. | |
$nginx_conf = "webdev_config.conf" | |
$nginx_conf_dir = "~\.podman_nginx_configs" | |
$website_src_files = "c:\Users\robertlambert\.webdevphp" | |
$website_name = "webdev" |
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
$Mac = "00:11:8c:ee:80:aa" | |
$MacByteArray = $Mac -split "[:-]" | ForEach-Object { [Byte] "0x$_"} | |
[Byte[]] $MagicPacket = (,0xFF * 6) + ($MacByteArray * 16) | |
$UdpClient = New-Object System.Net.Sockets.UdpClient | |
$UdpClient.Connect(([System.Net.IPAddress]::Broadcast),7) | |
$UdpClient.Send($MagicPacket,$MagicPacket.Length) | |
$UdpClient.Close() |
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
[CmdletBinding()] | |
Param ( | |
[Parameter(Mandatory=$false)] | |
[ValidateSet('Install','Uninstall','Repair')] | |
[string]$DeploymentType = 'Install', | |
[Parameter(Mandatory=$false)] | |
[ValidateSet('Interactive','Silent','NonInteractive')] | |
[string]$DeployMode = 'Interactive', | |
[Parameter(Mandatory=$false)] | |
[switch]$AllowRebootPassThru = $false, |
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 | |
### ATLAS Ubuntu install | |
# Assign user name | |
read -p "Enter your user name: " UserName | |
# Update Grub file | |
cp /etc/default/grub /etc/default/grub_backup | |
sed -i 's/\(GRUB_CMDLINE_LINUX_DEFAULT=".*\).*\("\)/\1 intel_pstate=disable\2/' /etc/default/grub |
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
:: Windows 10 Hardening Script | |
:: This is based mostly on my own personal research and testing. My objective is to secure/harden Windows 10 as much as possible while not impacting usability at all. (Think being able to run on this computer's of family members so secure them but not increase the chances of them having to call you to troubleshoot something related to it later on). References for virtually all settings can be found at the bottom. Just before the references section, you will always find several security settings commented out as they could lead to compatibility issues in common consumer setups but they're worth considering. | |
:: Obligatory 'views are my own'. :) | |
:: Thank you @jaredhaight for the Win Firewall config recommendations! | |
:: Thank you @ricardojba for the DLL Safe Order Search reg key! | |
:: Thank you @jessicaknotts for the help on testing Exploit Guard configs and checking privacy settings! | |
:: Best script I've found for Debloating Windows 10: https://github.com/Sycnex/Windows10Debloater | |
: |
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
------------------------------------------------------------------------- | |
USEFUL ONE-LINE SCRIPTS FOR SED (Unix stream editor) Dec. 29, 2005 | |
Compiled by Eric Pement - pemente[at]northpark[dot]edu version 5.5 | |
Latest version of this file (in English) is usually at: | |
http://sed.sourceforge.net/sed1line.txt | |
http://www.pement.org/sed/sed1line.txt | |
This file will also available in other languages: | |
Chinese - http://sed.sourceforge.net/sed1line_zh-CN.html |
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 | |
# Author: Robert Lambert | |
# Version: 0.1.0 | |
# Use this script to automate the set up of a Ubuntu 20.04 LTS for use as a machine learning workhorse | |
# ref: https://askubuntu.com/a/30157/8698 | |
# Root user check | |
if [ $SUDO_USER || $(id -u) = 0 ]; then | |
echo "The script need to be run as user." >&2 | |
exit 1 |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
function takeownershipandmovecsc{ | |
param( | |
[String]$username, #$env:username | |
[string]$homeshare, | |
[String]$homea, # $home | |
[string]$systemroot, # $env:systemroot | |
[String]$SysDrive #$env:SystemDrive | |
) | |
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
$a1 = @(1,2,3,4,5) | |
$b1 = "'This is string number'" | |
$Scriptblock = @" | |
`$Array = @(1,2,3,4,5) | |
`$String = $b1 | |
foreach(`$f in `$Array){ write-host "`$String `$f"} | |
start-sleep 10 | |
write-host pasta | |
start-sleep 10 |
NewerOlder