Skip to content

Instantly share code, notes, and snippets.

@mhempstock
mhempstock / thread_monkey.c
Last active February 12, 2019 08:50
Monkey Calc
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
#include <unistd.h>
int nuts;
pthread_mutex_t lock;
unsigned long long int counter;
int cpu_factor = 1;
@mhempstock
mhempstock / coldToFrozenS3.py
Created April 7, 2016 07:37
example based on Splunk's coldToFrozen.py example which rolls your frozen data into Amazon's S3. upload requires IAM roles for your nodes within AWS, or a separate s3 config file with your credentials to set via environment vars.
#!/usr/bin/env python
__author__ = "Atlassian"
import sys
import os
from subprocess import call
# run the script via the indexes.conf stanza
# [test]
# # roll to Frozen