Skip to content

Instantly share code, notes, and snippets.

View dlopes7's full-sized avatar
:octocat:

David Lopes dlopes7

:octocat:
View GitHub Profile

Create a collector

Requirements

Step by step

  • Create a file called mainifest.yaml with contents
import com.squareup.okhttp.OkHttpClient;
import com.squareup.okhttp.Request;
import com.squareup.okhttp.Response;
import java.io.IOException;
public class Parser {
public static void main(String[] args) {
let changeColor = document.getElementById('changeColor');
const bkg = chrome.extension.getBackgroundPage();
function logger(message, ...other) {
bkg.console.log(message, other);
}
function findElement(selector, foundCallBack) {
attempts = 0;
#!/usr/bin/env python
import requests
APPD_BASE_URL = 'http://controller.com:8090'
APPD_AUTH = ('admin@customer1', 'password')
APP = 23
MINUTES = 5
#!/usr/bin/env python
import requests
APPD_BASE_URL = 'http://controller.com:8090'
APPD_AUTH = ('admin@customer1', 'password')
APP = 23
MINUTES = 5
@dlopes7
dlopes7 / timeranges.go
Created July 25, 2018 18:32
Controller TimeRanges
package main
import (
"fmt"
"time"
"github.com/dlopes7/go-appdynamics-rest-api/appdrest"
"github.com/jinzhu/now"
"github.com/robfig/cron"
)
@dlopes7
dlopes7 / restui wrapper
Created June 7, 2018 14:38
A wrapper to call the AppDynamics restui apis, this won't work with all calls because it has json hardcoded on the headers, just a quick hack
#!/usr/bin/env bash
# Simple wrapper for AppDynamics restui API
# WIP
# ./restui.sh /controller/restui/analyticsSavedSearches/getAnalyticsSavedSearchById/192 > search.json
# Edit the file, then
# ./restui.sh /controller/restui/analyticsSavedSearches/updateAnalyticsSavedSearch -X POST -d @search.json
APPD_CONTROLLER=http://controller_host:8090
#!/usr/bin/env bash
APPD_CONTROLLER=http://controller:8090
APPD_USER=admin
APPD_ACCOUNT=customer1
APPD_PASSWORD=password
# Login to the controller for restui calls
curl -s --user $APPD_USER@$APPD_ACCOUNT:$APPD_PASSWORD --cookie-jar cookies.jar $APPD_CONTROLLER/auth?action=login
@dlopes7
dlopes7 / lab_draft.md
Last active June 19, 2018 17:34
EUM Practical Lab Draft

Step 1 - Setting up the environment

Ravello Environment

  1. Create a new application from the Blue Print PS - BRUM Lab
  2. Configure both servers to use a Private Key that you can access
    • If you do not have a Private Key, create a Key Par on Ravello.
  3. Publish and Start the application and wait for the servers to come up
@dlopes7
dlopes7 / generate_xml.py
Created March 23, 2018 13:29
Creates the Geo Location XML with data from dbip
import csv
from unicodedata import normalize
root = """<mappings>
{elements}</mappings>"""
element = """<mapping>
<ip-range from="{ip_from}" to="{ip_to}"/>
<location country="{country}" region="{region}" city="{city}"/>
</mapping>"""