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 | |
USER1="fabricio" | |
USER2="maria" | |
GROUP="admin" | |
echo "Iniciando la creación de usuarios" | |
#crea el usuario martir | |
useradd -m -d /home/$USER1 -s /bin/bash $USER1 |
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
#Increase the volume of a video with ffmpeg | |
ffmpeg -i input.flv -filter:a "volume=1.5" output.flv | |
#join to videos with ffmpeg inputs.txt has the path to the videos you want to join | |
ffmpeg -f concat -i inputs.txt -safe 0 -c copy output.mp4 | |
#Normalize videos to get consistency volume and remove noises and things like that | |
ffmpeg -i input.flv -filter:a loudnorm output.flv |
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
Install-WindowsFeature DNS -IncludeManagementTools | |
Get-Service -Name dns | |
Get-DnsClientServerAddress | |
Set-DnsClientServerAddress -InterfaceAlias "Ethernet0" -ServerAddresses 127.0.0.1,8.8.8.8 | |
Set-DnsClientServerAddress -InterfaceAlias "Ethernet1" -ServerAddresses 127.0.0.1,8.8.8.8 | |
Get-DnsClientServerAddress | |
$dominio = Read-Host "Ingresar el nombre del dominio" | |
Add-DnsServerPrimaryZone -Name "$dominio" -ZoneFile "db.$dominio" | |
$ip = Read-Host "Ingrese la IP del servidor" | |
Get-DnsServerResourceRecord -ZoneName "$dominio" |
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
Install-WindowsFeature Web-Server -IncludeManagementTools | |
Install-Module -Name 'IISAdministration' | |
Get-IISSite | |
mkdir C:\site1 | |
echo "<h1>Sitio 1</h1>" > C:\site1\index.html | |
New-IISSite -Name 'Site 1' -PhysicalPath 'C:\site1\' -BindingInformation "*:8080:" | |
New-NetFirewallRule -Name http1 -DisplayName 'HTTP1 Allows IIS (8080)' -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 8080 | |
Get-IISSite | |
mkdir C:\site2 | |
echo "<h1>Sitio 2</h1>" > C:\site2\index.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
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 | |
Write-Host "SSL connections enabled for this session" | |
Invoke-WebRequest -Uri https://github.com/PowerShell/Win32-OpenSSH/releases/download/v8.1.0.0p1-Beta/OpenSSH-Win64.zip -OutFile openssh-server.zip | |
Expand-Archive -LiteralPath .\openssh-server.zip -DestinationPath ‘C:\Program Files’ | |
$env:Path += "C:\Program Files\OpenSSH-Win64" | |
cd "C:\Program Files\OpenSSH-Win64" | |
.\Install-sshd.ps1 | |
Get-Service | ? Name -like *SSH* | |
Start-Service sshd | |
Set-Service -Name sshd -StartupType 'Automatic' |
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
Install-WindowsFeature Web-FTP-Server -IncludeAllSubFeature | |
Write-Host "Se instalo correctamente el servidor FTP" | |
Get-Service ftpsvc | |
Import-Module WebAdministration | |
mkdir "\inetpub\myftpsite\" | |
mkdir "\inetpub\myftpsite\LocalUser\" | |
mkdir "\inetpub\myftpsite\LocalUser\Administrador\" | |
mkdir "\inetpub\myftpsite\LocalUser\Administrador\public_html\" | |
New-WebFtpSite -Name "ftp" -Port "21" -Force | |
cmd /c \Windows\System32\inetsrv\appcmd set SITE "ftp" "-virtualDirectoryDefaults.physicalPath:C:\inetpub\myftpsite" |
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 | |
#services are exposed to Public IP, but for security you can use nginx as gateway. | |
#get the package of couch sync gateway | |
wget http://packages.couchbase.com/releases/couchbase-sync-gateway/2.6.0/couchbase-sync-gateway-community_2.6.0_x86_64.deb | |
#install the package | |
dpkg -i couchbase-sync-gateway-community_2.6.0_x86_64.deb |
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
#install base-tools | |
sudo apt-get install curl software-properties-common | |
#Download the setup | |
curl -sL https://deb.nodesource.com/setup_13.x | sudo bash - | |
#install nodejs on Debian | |
sudo apt-get install nodejs | |
#get version node |
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 public or local ip | |
IP="54.222.100.10" | |
#check server status | |
curl -X GET http://$IP:5984 | |
#list all databases | |
curl -X GET http://$IP:5984/_all_dbs | |
#set your db_name |
NewerOlder