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/env python3 | |
import sys | |
import os | |
import requests | |
import json | |
import datetime | |
# from socket import socket, AF_UNIX, SOCK_DGRAM | |
ACTION = None | |
IP = None |
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 | |
# Check if nginx is installed | |
echo "Check if nginx is installed" | |
if [[ $(dpkg-query -W -f='${Status}' nginx 2>/dev/null | grep -c "ok installed") -eq 0 ]]; then | |
echo "nginx is not installed" | |
exit 1 | |
fi | |
echo "Check if http_realip_module and realip_module are active in nginx" |
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 | |
[email protected] | |
KEY=11111111111111111111111111 | |
ZONE_ID=2222222222222222222222222 | |
curl -sLX GET https://api.cloudflare.com/client/v4/zones/${ZONE_ID}/dns_records?per_page=500 \ | |
-H "X-Auth-Email: ${EMAIL}" \ | |
-H "X-Auth-Key: ${KEY}" \ | |
-H "Content-Type: application/json" | jq .result[].id | tr -d '"' | ( |
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
server { | |
listen 80; | |
server_name localhost; | |
root /home/www-data/salfa-maquinaria/htdocs; | |
charset utf-8; | |
error_log /var/log/nginx/salfa.cl-error.log error; | |
access_log /var/log/nginx/salfa.cl-access.log main; | |
index index.php; |
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
yum -y install rh-nodejs8 | |
scl enable rh-nodejs8 bash | |
yum group install -y "Development Tools" | |
yum -y install libpng-devel | |
rpm -Uvh https://repo.mysql.com/mysql80-community-release-el7-3.noarch.rpm | |
sed -i 's/enabled=1/enabled=0/' /etc/yum.repos.d/mysql-community.repo | |
yum --enablerepo=mysql57-community install -y mysql-community-server |
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 | |
# Creator: Phil Cook | |
# Modified: Andy Miller | |
# Modified: Eduardo Aguad | |
brew_prefix=$(brew --prefix | sed 's#/#\\\/#g') | |
brew_array=("5.5","5.6","7.0","7.1","7.2", "7.3") | |
php_array=("[email protected]" "[email protected]" "[email protected]" "[email protected]" "[email protected]" "[email protected]") | |
valet_support_php_version_array=("[email protected]" "[email protected]" "[email protected]" "[email protected]" "[email protected]" "[email protected]") | |
php_installed_array=() |
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
<a href="http://www.unnuevofuturo.cl/" target="_blank" style=" | |
margin: 20px; | |
box-sizing: border-box; | |
background-color: #f0f0f0; | |
background-image: url(http://www.eligeeducar.cl/wp-content/uploads/2018/11/cover.png); | |
background-size: contain; | |
background-position: center; | |
display: block; | |
background-repeat: no-repeat; | |
"><img src="http://www.eligeeducar.cl/wp-content/uploads/2018/11/cover.png" style=""></a> |
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/sh | |
# @author Eduardo Aguad <[email protected]> | |
curl -L https://forge.laravel.com/ips-v4.txt | xargs -n 1 -I {} ufw allow from {} to any port 22 proto tcp; |
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/sh | |
# @author Eduardo Aguad <[email protected]> | |
cd /tmp | |
wget https://www.cloudflare.com/ips-v4 -O ips-v4-$$.tmp | |
wget https://www.cloudflare.com/ips-v6 -O ips-v6-$$.tmp | |
for cfip in `cat ips-v6-$$.tmp`; do ufw allow from $cfip to any port 443 proto tcp; done | |
for cfip in `cat ips-v4-$$.tmp`; do ufw allow from $cfip to any port 443 proto tcp; done |
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/expect -f | |
# Filename: beanstalk-purge | |
# Usage: ./beanstalk-purge $HOST $PORT $QUEUE $HOW_MANY | |
# Example: ./beanstalk-purge 127.0.0.1 11300 default 3000 | |
set timeout 1 | |
spawn telnet [lindex $argv 0] [lindex $argv 1] | |
sleep 1 | |
send "use [lindex $argv 2]\n" | |
expect "USING" |
NewerOlder