Skip to content

Instantly share code, notes, and snippets.

Coding, coding and coding...

William Ventura allexiusw

Coding, coding and coding...
View GitHub Profile
echo "Iniciando la creación de usuarios"
#crea el usuario martir
useradd -m -d /home/$USER1 -s /bin/bash $USER1
allexiusw / ffmepg_helpful_commands
Last active Apr 26, 2020
ffmepg helpful commands
View ffmepg_helpful_commands
#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
allexiusw / install_dns.ps1
Last active Mar 1, 2020
Install and configure DNS with Powershell. Working with zones and subdomains.
View install_dns.ps1
Install-WindowsFeature DNS -IncludeManagementTools
Get-Service -Name dns
Set-DnsClientServerAddress -InterfaceAlias "Ethernet0" -ServerAddresses,
Set-DnsClientServerAddress -InterfaceAlias "Ethernet1" -ServerAddresses,
$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"
allexiusw / install_iis.ps1
Created Feb 27, 2020
In this gist we install IIS Role and create 2 sites running in 8080 and 8888 ports.
View install_iis.ps1
Install-WindowsFeature Web-Server -IncludeManagementTools
Install-Module -Name 'IISAdministration'
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
mkdir C:\site2
echo "<h1>Sitio 2</h1>" > C:\site2\index.html
allexiusw / install_ssh.ps1
Last active Feb 29, 2020
SSH Install using Powershell, we also add the ssh directory to the Path environment.
View install_ssh.ps1
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Write-Host "SSL connections enabled for this session"
Invoke-WebRequest -Uri -OutFile
Expand-Archive -LiteralPath .\ -DestinationPath C:\Program Files
$env:Path += "C:\Program Files\OpenSSH-Win64"
cd "C:\Program Files\OpenSSH-Win64"
Get-Service | ? Name -like *SSH*
Start-Service sshd
Set-Service -Name sshd -StartupType 'Automatic'
allexiusw / install_ftp.ps1
Last active Feb 29, 2020
In this script we install FTP also we configure the isolate mode and some directives to allow Ftp connections without TLS 'cause we don't have SSL valid certificate.
View install_ftp.ps1
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"
allexiusw /
Last active Nov 15, 2019
Proof of concept Shared libraries on Linux
nano sqrttest.c
/* sqrttest.c */
#include <math.h>
#include <stdio.h>
int main(void)
printf("%g\n", sin(3.141592654/2.0));
return 0;
#save the script
allexiusw /
Last active Nov 15, 2019
Install Couch Sync Gateway for Mobiles
#services are exposed to Public IP, but for security you can use nginx as gateway.
#get the package of couch sync gateway
#install the package
dpkg -i couchbase-sync-gateway-community_2.6.0_x86_64.deb
allexiusw /
Last active Nov 15, 2019
Install NodeJS, CouchDB and nano
#install base-tools
sudo apt-get install curl software-properties-common
#Download the setup
curl -sL | sudo bash -
#install nodejs on Debian
sudo apt-get install nodejs
#get version node
#set your public or local ip
#check server status
curl -X GET http://$IP:5984
#list all databases
curl -X GET http://$IP:5984/_all_dbs
#set your db_name