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
import "stdlib/native" | |
import * as cli from "stdlib/cmdline" | |
/** | |
* ------------------------------------------------------------------ | |
* Extract databases and tables from dump files | |
* | |
* usage: amura extract -f foo.sql -d bardb | |
* ------------------------------------------------------------------ | |
*/ |
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
import "stdlib/native" | |
/** | |
* ------------------------------------------------------------------ | |
* Extract databases and tables from dump files | |
* | |
* usage: amura extract -f foo.sql -d bardb | |
* ------------------------------------------------------------------ | |
*/ |
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
let data = { "email_address": time.unixNano() + "@prueba.com", "status": "subscribed" }; | |
let r = http.newRequest("POST", "https://us19.api.mailchimp.com/3.0/lists/1652876acb/members", data) | |
r.setBasicAuth("xx", "xx") | |
r.execute() | |
r = http.newRequest("GET", "https://us19.api.mailchimp.com/3.0/lists/1652876acb/members", data) | |
r.setBasicAuth("xxx", "xx") | |
let res = json.unmarshal(r.execute()) | |
fmt.println(res.total_items) |
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
import "stdlib/native" | |
import * as web from "stdlib/web"; | |
export function getPluginInfo() { | |
return { | |
name: "@@Buscador", | |
description: "@@Añade un buscador global en la barra superior." | |
} | |
} |
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
class YieldTable { | |
element: HTMLElement; | |
constructor(data: Data) { | |
this.element = S.create("div", "amura_yield_table") | |
this.parseValues(data) | |
this.render(data) | |
} | |
private parseValues(data: Data) { |
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
import "stdlib/native"; | |
function main() { | |
let s = http.newServer(); | |
s.address = ":8081"; | |
s.handler = zipHandler | |
s.start(); | |
} | |
function zipHandler(w: http.Response, r: http.Request) { |
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
<% if(client) { %> | |
<h2><%= client.name %></h2> | |
<% } %> |
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
# flush iptable rules | |
iptables -F | |
iptables -t nat -F | |
iptables -t nat -X | |
iptables -t mangle -F | |
iptables -t mangle -X | |
# Allowing DNS lookups (tcp, udp port 53) | |
iptables -A OUTPUT -p tcp --dport 53 -m state --state NEW,ESTABLISHED -j ACCEPT | |
iptables -A INPUT -p tcp --dport 53 -m state --state NEW,ESTABLISHED -j ACCEPT |
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
iptables -F | |
iptables -t nat -F | |
iptables -t nat -X | |
iptables -t mangle -F | |
iptables -t mangle -X | |
iptables -P INPUT ACCEPT | |
iptables -P FORWARD ACCEPT | |
iptables -P OUTPUT ACCEPT |
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
# flush iptable rules | |
iptables -F | |
# Allowing DNS lookups (tcp, udp port 53) | |
iptables -A OUTPUT -p tcp --dport 53 -m state --state NEW,ESTABLISHED -j ACCEPT | |
iptables -A INPUT -p tcp --dport 53 -m state --state NEW,ESTABLISHED -j ACCEPT | |
iptables -A OUTPUT -p udp --dport 53 -m state --state NEW,ESTABLISHED -j ACCEPT | |
iptables -A INPUT -p udp --dport 53 -m state --state NEW,ESTABLISHED -j ACCEPT | |
# Allow web traffic |