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
class Script { | |
process_incoming_request({ request }) { | |
const data = request.content; | |
// Helper function to format timestamp | |
const formatTimestamp = (timestamp) => { | |
if (!timestamp || timestamp === "null") return "N/A"; | |
const date = new Date(parseInt(timestamp) / 1000); | |
return date.toISOString().replace("T", " ").replace("Z", " UTC"); | |
}; |
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
import json, ast | |
from flask import Flask, request, abort | |
from pygments import highlight, lexers, formatters | |
app = Flask(__name__) | |
@app.route('/webhook', methods=['POST']) | |
def webhook(): | |
if request.method == 'POST': | |
formatted_json = json.dumps(request.json, indent=2, sort_keys=True) |
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 bash | |
# | |
# Get the value of a tag for a running EC2 instance. | |
# | |
# This can be useful within bootstrapping scripts ("user-data"). | |
# | |
# Note the EC3 instance needs to have an IAM role that lets it read tags. The policy | |
# JSON for this looks like: | |
# | |
# { |
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
# I couldn't find any documentation or mention of using a EB platform in Terraform templates. | |
# solution_stack_name example: arn:aws:elasticbeanstalk:us-west-2:055555555555:platform/eb-elixir/1.0.15 | |
resource "aws_elastic_beanstalk_environment" "main" { | |
name = "main" | |
description = "EB Environment with custom platform" | |
solution_stack_name = "arn:aws:elasticbeanstalk:us-west-2:<account_number>:platform/<platform_name>/<platform_version>" | |
} |
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
# aug/19/2016 16:09:25 by RouterOS 6.36 | |
# software id = Y92J-ABBU | |
# | |
/interface bridge | |
add admin-mac=E4:8D:8C:A8:9B:DB auto-mac=no name=bridge-local | |
/interface wireless | |
set [ find default-name=wlan1 ] band=2ghz-b/g/n channel-width=20/40mhz-Ce \ | |
country=canada disabled=no distance=indoors frequency=auto mode=ap-bridge \ | |
name=WLAN1 ssid=blah wds-default-bridge=bridge-local wds-mode=\ | |
dynamic-mesh wireless-protocol=802.11 |
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
///<package.json> | |
... | |
"devDependencies": { | |
... | |
"typings": "^1.3.1" | |
... | |
///<Makefile> | |
build: node_modules typings |
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
interface BVI1 | |
description $FW_INSIDE$ | |
ip address 10.1.8.1 255.255.255.0 | |
ip access-group 102 in | |
no ip redirects | |
no ip unreachables | |
no ip proxy-arp | |
ip nat inside | |
ip virtual-reassembly in | |
! |
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
[Fri Jan 15 15:03:02.480160 2016] [suexec:notice] [pid 9534] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) | |
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message | |
[Fri Jan 15 15:03:02.499142 2016] [auth_digest:notice] [pid 9534] AH01757: generating secret for digest authentication ... | |
[Fri Jan 15 15:03:02.499976 2016] [lbmethod_heartbeat:notice] [pid 9534] AH02282: No slotmem from mod_heartmonitor | |
[Fri Jan 15 15:03:02.507829 2016] [mpm_prefork:notice] [pid 9534] AH00163: Apache/2.4.6 (CentOS) mod_wsgi/3.4 Python/2.7.5 configured -- resuming normal operations | |
[Fri Jan 15 15:03:02.507877 2016] [core:notice] [pid 9534] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND' | |
[Fri Jan 15 15:03:11.106365 2016] [:error] [pid 9535] [remote {myip}] mod_wsgi (pid=9535): Exception occurred processing WSGI script '/var/www/ecm-site/wsgi/ecm.wsgi'. | |
[Fri Jan 15 15:03:11.106462 2016] [:error] [pid |
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
vyos@vyos:~$ show conf | |
interfaces { | |
ethernet eth0 { | |
address 10.1.8.10/24 | |
description OUTSIDE | |
duplex auto | |
hw-id 00:15:5d:08:2c:03 | |
smp_affinity auto | |
speed auto | |
} |
NewerOlder