This file contains hidden or 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
| include "/etc/bind/named.conf.options"; | |
| include "/etc/bind/named.conf.logging"; | |
| include "/etc/bind/named.conf.local"; | |
| include "/etc/bind/named.conf.default-zones"; |
This file contains hidden or 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
| acl localnet src 172.28.128.0/23 | |
| acl SSL_ports port 443 | |
| acl Safe_ports port 80 # http | |
| acl Safe_ports port 21 # ftp | |
| acl Safe_ports port 443 # https | |
| acl Safe_ports port 70 # gopher | |
| acl Safe_ports port 210 # wais | |
| acl Safe_ports port 1025-65535 # unregistered ports | |
| acl Safe_ports port 280 # http-mgmt | |
| acl Safe_ports port 488 # gss-http |
This file contains hidden or 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
| # Configuración | |
| LAN=(enp13s0f0 enp13s0f1 enp14s0f0) | |
| WAN=enp3s0 | |
| DNS=(172.27.111.5 172.27.111.6) | |
| IP=172.28.128.6 | |
| MASK=23 | |
| GATEWAY=172.28.128.1 |
This file contains hidden or 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
| source ./config.cfg | |
| ###################################################### | |
| # | |
| # 1. Creamos los puentes y añadimos los interfaces | |
| ip link add name br0 type bridge | |
| for interface in "${LAN[@]}" | |
| do | |
| ip link set $interface up | |
| ip link set $interface master br0 |
This file contains hidden or 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
| # PARTE 2: Reglas IPTABLES | |
| IPT=/sbin/iptables | |
| EBT=/sbin/ebtables | |
| # Activamos el forwarding | |
| sysctl net.ipv4.ip_forward=1 | |
| # Limpiamos todas las reglas | |
| $IPT -t nat -F |
This file contains hidden or 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
| FIREQOS_CONNMARK_RESTORE="act_connmark" | |
| # Download | |
| interface veth2 lan output balanced rate 30Mbit | |
| # 1SMR | |
| class group 1SMR rate 20% ceil 80% | |
| match dstmac 00:04:23:88:be:ee # MAC WAN del servidor de 1SMR | |
| class youtube prio 7 |
This file contains hidden or 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
| const jsdom = require("jsdom-global")(); | |
| const $ = require("jquery"); | |
| // modify HTML | |
| document.body.innerHTML = "<!DOCTYPE html><form id=\"form1\"><textarea id=\"tb1\">Hello world</textarea></form>"; | |
| function keyPressed(e) { | |
| console.log("keypressed"); | |
| } |
This file contains hidden or 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
| public static JSONObject requestWebService(String serviceUrl) { | |
| disableConnectionReuseIfNecessary(); | |
| HttpURLConnection urlConnection = null; | |
| try { | |
| // create connection | |
| URL urlToRequest = new URL(serviceUrl); | |
| urlConnection = (HttpURLConnection) | |
| urlToRequest.openConnection(); | |
| urlConnection.setConnectTimeout(CONNECTION_TIMEOUT); |
This file contains hidden or 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
| MICROSOFT DREAMSPARK DIRECT | |
| CONTRATO DE SUSCRIPCIÓN | |
| Última actualización: Junio de 2013 | |
| Este es un contrato de suscripción (“contrato”) entre Microsoft Corporation (o, según donde resida, una de sus filiales) y usted, para la oferta para estudiantes de Microsoft DreamSpark Direct (“Suscripción a DreamSpark Direct”). Le rogamos que lo lea atentamente. Para fines de este contrato, el término “software” se aplica al software que se le proporcionó en virtud de la Suscripción a DreamSpark Direct, lo que incluye los soportes físicos en que lo recibió, si los hubiera. | |
This file contains hidden or 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 getRedditUserData(usuario) { | |
| var url="http://www.reddit.com/user/" + usuario + "/about.json"; | |
| Logger.log("URL:" +url); | |
| var response = UrlFetchApp.fetch(url); | |
| Logger.log("RESPONSE:" + response); | |
| return response.getContentText(); | |
| } | |
| function getCommentKarma(data) { | |
| var json = JSON.parse(data); |