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
(function () { | |
var total = 0; | |
var yearmon = '100010'; | |
var year = '2012'; | |
var month = '00'; | |
function init(num) { | |
num = (typeof num !== 'number' ? 0 : num); | |
if (num === 0) { | |
$('<div/>').css({ | |
position: 'fixed', |
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
#!/bin/sh | |
api_key=xxxxxxxxxxxxxxxx | |
app_key=xxxxxxxxxxxxxxxxxxxxxx | |
to_time=$(date +%s) | |
from_time=$(date -d '10 minutes ago' +%s) | |
curl -G \ | |
"https://app.datadoghq.com/api/v1/query" \ | |
-d "api_key=${api_key}" \ |
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 python | |
import json | |
import urllib.request | |
import csv | |
import traceback | |
import dateutil.parser | |
ep_url = 'https://api1.central.sophos.com/gateway/migration-tool/v1/endpoints' |
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
from __future__ import print_function | |
import base64 | |
import json | |
from datetime import datetime | |
print('Loading function') | |
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 python | |
import subprocess | |
import re | |
import time | |
from checks.network_checks import NetworkCheck, Status | |
class PingCheck(NetworkCheck): | |
def __init__(self, name, init_config, agentConfig, instances): |
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 ruby | |
require 'pdf-reader' | |
reader = PDF::Reader.new("invoice.pdf") | |
start_point = false | |
data = [] | |
reader.pages[0].text.split("\n").each do |line| | |
next if line.length == 0 |
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 ruby | |
class PhpClass | |
attr_reader :filepath, :body | |
def initialize(filepath) | |
@filepath = filepath | |
end |