Skip to content

Instantly share code, notes, and snippets.

@Avotrix
Avotrix / gist:6653ed8a6a7b77b0a2a29e2909e02818
Created February 26, 2019 19:16
Rename Attachment using Python Script
if argvals.get('attachment_name'):
ssContent['action.email.reportFileName'] = argvals.get('attachment_name')
*nix:$SPLUNK_HOME/bin/splunk cmd openssl req -new -key myCAPrivateKey.key -out myCACertificate.csr
Win: $SPLUNK_HOME\bin\splunk cmd openssl req -new -key myCAPrivateKey.key -out myCACertificate.csr
*nix: $SPLUNK_HOME/bin/splunk cmd openssl x509 -req -in myCACertificate.csr
-signkey myCAPrivateKey.key -out myCACertificate.pem -days 3650
Win: >$SPLUNK_HOME\bin\splunk cmd openssl x509 -req -in myCACertificate.csr
-signkey myCAPrivateKey.key -out myCACertificate.pem -days 3650
@Avotrix
Avotrix / shards and replicas
Created March 5, 2019 14:14
Kibana Index Creation and Mapping
PUT /catalog
{
"settings": {
"index": {
"number_of_shards": 5,
"number_of_replicas": 2
} } }
@Avotrix
Avotrix / Type - text & keyword
Created March 5, 2019 14:18
Kibana Index Creation and Mapping
PUT /catalog
{
"settings": {
"index": {
"number_of_shards": 5,
"number_of_replicas": 2
}
},
"mappings": {
"my_type": {
@Avotrix
Avotrix / gist:d7a918cea7b3c567352b2e75ee823e39
Created April 19, 2019 19:08
Setting up DB to work for Teamcenter
REM This script creates the Additional Tablespace (IDATA, ILOG & INDX) for Teamcenter
REM Modify DATAFILE path as per ORADATA path
prompt Creating TABLESPACE IDATA.
CREATE TABLESPACE IDATA
@Avotrix
Avotrix / HEC.ino
Last active December 6, 2019 14:57
#include <ESP8266WiFi.h>
#include <ESP8266HTTPClient.h>
#include "DHT.h"
#define DHTPIN 5
#define DHTTYPE DHT11
float t,h;
DHT dht(DHTPIN, DHTTYPE);
void setup() {
# rsyslog configuration file
# For more information see /usr/share/doc/rsyslog-*/rsyslog_conf.html
# If you experience problems, see http://www.rsyslog.com/doc/troubleshoot.html
#### MODULES ####
# The imjournal module bellow is now used as a message source instead of imuxsock.
$ModLoad imuxsock # provides support for local system logging (e.g. via logger command)
$ModLoad imjournal # provides access to the systemd journal
[linux_secure]
EXTRACT-orig_host = ^\w+\s+\d+\s+\d+:\d+:\d+\s+(?P<orig_host>\w+)
@Avotrix
Avotrix / Fingerprint.ino
Created December 11, 2019 21:52
Start a Motor Bike with Finger Print
#include <Adafruit_Fingerprint.h>
#define Button 2
#define Relay 4
#define LED 16
SoftwareSerial mySerial(14, 12);
Adafruit_Fingerprint finger = Adafruit_Fingerprint(&mySerial);
uint8_t id;
void setup()