Skip to content

Instantly share code, notes, and snippets.

@luanntvn
luanntvn / check_redis.py
Last active September 5, 2022 17:50 — forked from samuel/check_redis.py
Redis health and memory check for Nagios
#!/usr/bin/python
#
# LICENSE: MIT
#
# Copyright (C) 2014 Samuel Stauffer
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation
@luanntvn
luanntvn / Download SalesForce Report in CSV to import into MySQL
Created March 27, 2016 20:38
Because the SalesForce Analytics API limits up to 2000 records (https://developer.salesforce.com/forums/?id=906F0000000BKDaIAO ) so we need to pull report in CSV
import requests, csv, re, sys
from simple_salesforce import Salesforce
import MySQLdb
sfConfig = {
'username': 'zzz',
'password': 'zzz',
'security_token': 'zzzz',
'url': 'zzz.my.salesforce.com',
'report_id': 'zzzz'