Skip to content

Instantly share code, notes, and snippets.

View virtualex-itv's full-sized avatar
:electron:
"I drink and I know things" ~Tyrian Lanister

Alex López virtualex-itv

:electron:
"I drink and I know things" ~Tyrian Lanister
View GitHub Profile
@Integralist
Integralist / GitHub curl.sh
Last active June 18, 2024 23:31 — forked from madrobby/gist:9476733
Download a single file from a private GitHub repo. You'll need an access token as described in this GitHub Help article: https://help.github.com/articles/creating-an-access-token-for-command-line-use
curl --header 'Authorization: token INSERTACCESSTOKENHERE' \
--header 'Accept: application/vnd.github.v3.raw' \
--remote-name \
--location https://api.github.com/repos/owner/repo/contents/path
# Example...
TOKEN="INSERTACCESSTOKENHERE"
OWNER="BBC-News"
REPO="responsive-news"
@MyITGuy
MyITGuy / Get-OSProductType.ps1
Last active November 1, 2023 19:07
PowerShell: Get the operating system product type.
function Get-OSProductType {
[CmdletBinding(SupportsShouldProcess=$True,DefaultParameterSetName="None")]
PARAM(
[Parameter(Mandatory = $false, Position = 0, ValueFromPipeline = $true)]
[string]$ComputerName = $env:COMPUTERNAME
)
<#
.SYNOPSIS
Get the operating system product type.
.DESCRIPTION
@turibbio
turibbio / WriteFormattedOutput.ps1
Created August 18, 2015 23:08
Write colored output with Powershell cmdlet Write-Output
function Write-FormattedOutput
{
[CmdletBinding()]
Param(
[Parameter(Mandatory=$True,Position=1,ValueFromPipeline=$True,ValueFromPipelinebyPropertyName=$True)][Object] $Object,
[Parameter(Mandatory=$False)][ConsoleColor] $BackgroundColor,
[Parameter(Mandatory=$False)][ConsoleColor] $ForegroundColor
)
# save the current color
@julianxhokaxhiu
julianxhokaxhiu / README.md
Last active April 19, 2022 20:09
How to install OSX 10.11 El Capitan on VMWare

How to install OSX 10.11 El Capitan on VMWare

To accomplish this tutorial you already need a previous copy of OSX installed on VMWare Player or Workstation.

0) Acquire a copy of OSX 10.11 El Capitan

First of all you need to acquire a legal copy of OSX El Capitan from the App Store. This tutorial will not cover this part. Sorry :)

1) Unlock OSX option on VMWare

Download the latest version of VMWare Unlocker and use the relative binary to unlock it ( based on your Host OS ).

@jdhitsolutions
jdhitsolutions / Check-ModuleUpdate.ps1
Last active May 30, 2023 11:17
Test installed PowerShell modules against online versions in the PowerShell Gallery.
[cmdletbinding()]
[outputtype("moduleInfo")]
Param(
[Parameter(Position = 0, HelpMessage = "Enter a module name or names. Wildcards are allowed.")]
[ValidateNotNullorEmpty()]
[string[]]$Name = "*"
)
Write-Verbose "Getting installed modules"
Try {
@patrickfuller
patrickfuller / alias_dns.py
Last active January 29, 2024 16:29
Enables local DNS resolution of Unifi aliases
"""
When run in cron, automatically adds compliant alias names to local DNS.
Use at your own risk.
Patrick Fuller, 25 June 17
"""
import re
import paramiko
import pymongo
@mackwage
mackwage / windows_hardening.cmd
Last active July 22, 2024 03:37
Script to perform some hardening of Windows OS
:: 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
:
@systemcenterblog
systemcenterblog / Job error (0x80004005).ps1
Last active September 8, 2023 18:41
Job error (0x80004005) Unable to read existing WUA Group Policy object
<#
Script Disclaimer: The sample scripts provided here are not supported under any Microsoft standard support program or service.
All scripts are provided AS IS without warranty of any kind.
ERRORS:
UpdatesDeployment.log
Job error (0x80004005) received for assignment ({bf7a48e6-d220-4070-bb9b-ecc239107584}) action UpdatesDeploymentAgent 12/6/2017 10:32:27 AM 2096 (0x0830)
WUAHandler.log
Unable to read existing WUA Group Policy object. Error = 0x80004005. WUAHandler 12/6/2017 3:41:00 AM 2828 (0x0B0C)
@troyfontaine
troyfontaine / README.md
Last active October 15, 2023 09:58
Ubiquiti USG config.gateway.json Syntax

Ubiquiti USG Advanced Configuration

Overview

Integrated DNS Overview

When using a USG with Ubiquiti's Unifi Controller software (version 5.6 and earlier), the functionality of integrating the hostnames of clients (when they request a DHCP lease) into local DNS does not appear to work as you would find with Consumer grade routers. To work around this limitation, we can add static host mappings to a configuration file that will be provisioned to the USG when either a configuration change is made or we force provisioning to the USG itself.

Non-GUI Supported Dynamic DNS Providers

I've added in the necessary syntax for adding Cloudflare DDNS to the USG for VPN/Services setup courtesy of this post by britannic on the Ubiquiti Forums.

Configuration File

function prompt {
# https://github.com/dahlbyk/posh-git/wiki/Customizing-Your-PowerShell-Prompt
$realLASTEXITCODE = $LASTEXITCODE
Write-Host
if ($PSVersionTable.PSEdition -eq 'Core') {
Write-Host '(Core) ' -NoNewline
}
write-host "[" -noNewLine