Skip to content

Instantly share code, notes, and snippets.

View BlackMaria's full-sized avatar
💭
hating social media and public status indicators

Hroðgar Skjöldung BlackMaria

💭
hating social media and public status indicators
  • 3rd planet left of the yellow one
View GitHub Profile
@BlackMaria
BlackMaria / my-gpg-key.asc
Created September 9, 2015 14:38
My old keys are antiquated, I dont trust them, but not enough to revoke them. I just wont use them.
place holder

Create an IRC git-hook

USERNAME=user:pass
OWNER=someguy
REPO=thing
curl -u $USERNAME -H "Accept: application/json" ${DEBUG}  https://api.github.com/repos/${OWNER}/${REPO}/hooks -d '{"config": {
      "nick": "ggl_bot",
      "port": "6667",
 "server": "chat.freenode.net",
#!/bin/bash
IRSSI_VERSION=0.8.17
OTR_VERSION=4.1.0
PREFIX=/opt/irssi
cat <<EOF > /tmp/list.$$
https://otr.cypherpunks.ca/libotr-${OTR_VERSION}.tar.gz
https://otr.cypherpunks.ca/libotr-${OTR_VERSION}.tar.gz.asc
#!/bin/sh
for MACHINE in $*
do
sdc-vmapi /vms/$MACHINE | json -Ha uuid alias state
eval "sdc-vmapi /job_results -X POST --data '{\"vm_uuid\": \"$MACHINE\", \"execution\": \"failed\" }'"
sdc-vmapi /vms/$MACHINE | json -Ha uuid alias state
done
@BlackMaria
BlackMaria / install_logstash_kibana_centos.sh
Created February 10, 2014 17:00
here is an quick example of how to install logstash and kibana to get you quick started
#!/bin/sh
#
# To use logstash you need java
# To use kibana you need nodejs
#
# java and nodejs are on EPEL
#
rpm -Uvh http://fedora.mirror.nexicom.net/epel/6/i386/epel-release-6-8.noarch.rpm
yum -y install java-1.7.0-openjdk nodejs
@BlackMaria
BlackMaria / 0
Last active December 18, 2015 18:19
It seems that installing the latest version of Vagrant breaks the old config.
[originally posted in 2013] It seems that installing the latest version of Vagrant breaks the old config.
If there is something I hate, it is code that is not backward compatible AND breaks OLD configs at the same time.
...That is to say, I installed the NEW vagrant and was told my boxes were build for OLD vagrant.
So ( being in a rush) I reinstalled the old vagrant and that complained that I had a NEW vagrant config and refused to work.
Meaning once you install the NEW vagrant your old config is broken so you must fix it...
Well, this is the thing I did. Anyway, were would I be without vagrant! So thanks just the same
@BlackMaria
BlackMaria / logstash_testcase_output.json
Created June 5, 2013 14:14
The way I am dealing with grok failures is to create a test case from them. For others in the same boat I suggest you add this "output" to your logstash configs ( I suggest all of them ) and then you are automatically creating test cases to see what failed! NB: It has been suggested to try to pass "_grokparsefailure" tagged files passed the same…
output {
file {
#gzip => true
path => "/var/log/testcases/failed_grok_%{type}"
tags => "_grokparsefailure"
}
# ....
}
@BlackMaria
BlackMaria / notes.ttx
Created May 24, 2013 21:14
scattered notes on configuring sflow for ntop & cisco
##################################
## CISCO
NetFlow
##################################
enable
configure terminal
ip
@BlackMaria
BlackMaria / monitor_debug_cisco_wifi.sh
Created May 24, 2013 21:11
copy this to a cisco wlc to watch the fireworks!
debug client ${HEXSTUFF}
debug dhcp packet enable
debug dot11 mobile enable
debug dot11 state enable
debug dot1x events enable
debug pem events enable
debug pem state enable
debug cckm client debug enable
@BlackMaria
BlackMaria / mk_lumberjack_keys.sh
Created May 24, 2013 20:58
This is what I eventually used to generate ssl keys for lumberjack. I had made several attempts that failed and with the help of tomar ( how pointed me to a page for apache certs... ) this is what I did and it worked.
#!/bin/sh
SERVER=logstash
################################################
if [ ! -f "${SERVER}.crt" -o ! -f "${SERVER}.key" ] ; then
rm -f ${SERVER}.{crt,key,csr}
openssl genrsa -des3 -out ${SERVER}.key 1024
openssl req -new -key ${SERVER}.key -out ${SERVER}.csr
cp ${SERVER}.key ${SERVER}.key.org
openssl rsa -in ${SERVER}.key.org -out ${SERVER}.key
openssl x509 -req -days 365 -in ${SERVER}.csr -signkey ${SERVER}.key -out ${SERVER}.crt