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 | |
# hobbes3 | |
import xml.etree.ElementTree as ET | |
import csv | |
from statistics import mean | |
KML_FILE = "sf_blocks.kml" | |
CSV_FILE = "sf_blocks_lat_lon.csv" | |
CSV_COLUMNS = ["BLKLOT", "lat", "lon"] |
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
# Must run as root | |
NAME="my_server" | |
SSH_PORT=9922 | |
hostnamectl set-hostname $NAME | |
# SSH | |
echo -e "\nPort $SSH_PORT" >> /etc/ssh/sshd_config | |
service ssh restart |
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
<!-- Provided by Gleb Esman --> | |
<html> | |
<div> | |
<a type="button" style="margin-bottom: 10px;" class="btn" href="/app/$env:app$/$env:page$">Reset dashboard</a> | |
</div> | |
</html> |
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
# Running as root | |
### PYENV | |
yum install -y git gcc gcc-c++ make git patch openssl-devel zlib-devel readline-devel sqlite-devel bzip2-devel zlib libffi-devel | |
# Switch to the user that will use pyenv | |
git clone https://github.com/pyenv/pyenv.git ~/.pyenv | |
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bash_profile | |
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bash_profile | |
echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init -)"\nfi' >> ~/.bash_profile | |
. ~/.bash_profile |
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
find /opt/splunk/etc/master-apps/ -name ".git" -exec dirname {} \; | xargs -I {} sh -c "echo {}; git -C {} pull;" |
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 | |
# hobbes3 | |
import os | |
import time | |
import sys | |
import glob | |
import subprocess | |
import pexpect | |
import logging |
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 | |
# hobbes3 | |
# A way to handle indexing 2+ million XML files in a single directory (synced from a S3 bucket) | |
import glob | |
import time | |
import logging | |
import logging.handlers | |
import subprocess |
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
@version: 3.5.6 | |
# Typically placed as /etc/syslog-ng/conf.d/splunk.conf | |
options { | |
create-dirs(yes); | |
owner("splunk"); | |
group("splunk"); | |
dir-owner("splunk"); |
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
define([ | |
'jquery', | |
'underscore', | |
'd3', | |
'api/SplunkVisualizationBase', | |
'api/SplunkVisualizationUtils' | |
], | |
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
import cherrypy | |
import json | |
import pprint | |
import logging | |
import splunk.appserver.mrsparkle.controllers as controllers | |
from splunk.appserver.mrsparkle.lib.decorators import expose_page | |
from splunk.appserver.mrsparkle.lib.routes import route | |
from splunk.appserver.mrsparkle.lib.util import make_url | |
def setup_logger(modulename): |
NewerOlder