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
| #!/usr/bin/env python | |
| from statsd import StatsClient | |
| import requests | |
| import json | |
| statsd = StatsClient() | |
| url = 'http://127.0.0.1:8050/_debug' | |
| resp = requests.get(url=url) | |
| metrics = json.loads(resp.text) |
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
| #!/bin/bash | |
| # | |
| # Bash completion for Knife 0.10+ | |
| # | |
| if [ $(uname) = "Darwin" ]; then | |
| SED="gsed" | |
| else | |
| SED="sed" | |
| fi |
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
| # Make sure to have fpm installed as well as dependancies described here: https://github.com/scrapinghub/splash/blob/master/dockerfiles/splash/provision.sh | |
| # Environment Setup | |
| sudo mkdir -p /tmp/{downloads,build,target} | |
| sudo mkdir -p /tmp/{downloads,build,target} | |
| # Build qt-5.9.1 deb | |
| sudo curl -L -o /tmp/downloads/qt-installer-noninteractive.qs https://raw.githubusercontent.com/scrapinghub/splash/master/dockerfiles/splash/qt-installer-noninteractive.qs | |
| sudo sed -i 's|/opt/qt59|/tmp/target/opt/qt59|g' /tmp/downloads/qt-installer-noninteractive.qs | |
| sudo curl -L -o /tmp/downloads/qt-installer.run http://download.qt.io/official_releases/qt/5.9/5.9.1/qt-opensource-linux-x64-5.9.1.run |
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
| #!/usr/bin/env python | |
| import performline.embedded.stdlib.clients.rest.exceptions | |
| from performline.client import Client | |
| from glob import iglob | |
| import argparse | |
| import json | |
| import sys | |
| class PlineExportReport(object): | |
| def __init__(self, token=None, path='.'): |
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
| # Create build root | |
| mkdir -p /tmp/build/etc/redis/ | |
| mkdir -p /tmp/build/opt/redis/data/ | |
| mkdir -p /tmp/build/opt/redis/modules/ | |
| mkdir -p /tmp/build/etc/systemd/system/ | |
| # Get Redis | |
| wget https://github.com/antirez/redis/archive/5.0-rc1.tar.gz | |
| tar zxvf 5.0-rc1.tar.gz | |
| cd redis-5.0-rc1/ |
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
| # This code demonstrates how to loop through an API using limit+offset. | |
| # | |
| # It will get all of the results as it pages through the data by limit and | |
| # offset preventing the backend that serves it from getting overwhelemed. | |
| # | |
| # It will then put all of that collected data into a CSV for later processing. | |
| # | |
| # This code was thrown together as a demonstration, no warrenties are given or | |
| # implied. | |
| import requests |
OlderNewer