Skip to content

Instantly share code, notes, and snippets.

@jsh2134
jsh2134 / FacebookWordCloud.py
Created February 13, 2012 17:37 — forked from bostwick/FacebookWordCloud.py
Facebook News Feed Word Cloud
#!/usr/bin/env python
import sys
import urllib2
import json
from collections import defaultdict
from nltk import word_tokenize
IGNORED_WORDS = ["!", ".", ",", "(", ")", "'s", ":", "?", "...", "$",
@jsh2134
jsh2134 / gist:14027c69464498bc8ed2
Created July 12, 2015 21:24
HekaSockerHandler logging implementation
import traceback
import logging
from logging.handlers import SocketHandler
import heka
class HekaSocketHandler(SocketHandler):
SEVERITY_MAP = {
@jsh2134
jsh2134 / log_access.md
Created March 15, 2024 17:19 — forked from burnsie7/log_access.md
Granting access to logs for dd-agent (linux)

The datadog agent runs under the dd-agent user and dd-agent group. This prevents dd-agent accessing the logs in /var/log as they are only accessible by root (or a sudo admin).

In order to allow read only access for dd-agent only, create ACL's and modify logrotate to persist the permissions changes.

You can manually set the ACL with:

sudo setfacl -m g:dd-agent:rx /var/log/<application-name>

This will not persist as logrotate will not re-apply the ACL setting so for a more permanent solution you can add a rule to logrotate to reset the ACL. You will need to create a new file: