Skip to content

Instantly share code, notes, and snippets.

View madchap's full-sized avatar

Fred Blaise madchap

  • Vaud, Switzerland
View GitHub Profile
@madchap
madchap / gist:1acf24a25695858955dfe5aae4ae1665
Created January 18, 2017 15:27
ES exception graylog parsing
2017-01-18T15:08:23.751Z ERROR [AlertScannerThread] Skipping alert check that threw an exception.
org.elasticsearch.action.search.SearchPhaseExecutionException: all shards failed
at org.elasticsearch.action.search.AbstractSearchAsyncAction.onFirstPhaseResult(AbstractSearchAsyncAction.java:206) ~[graylog.jar:?]
at org.elasticsearch.action.search.AbstractSearchAsyncAction$1.onFailure(AbstractSearchAsyncAction.java:152) ~[graylog.jar:?]
at org.elasticsearch.action.ActionListenerResponseHandler.handleException(ActionListenerResponseHandler.java:46) ~[graylog.jar:?]
at org.elasticsearch.transport.netty.MessageChannelHandler.handleException(MessageChannelHandler.java:212) ~[graylog.jar:?]
at org.elasticsearch.transport.netty.MessageChannelHandler.handlerResponseError(MessageChannelHandler.java:202) ~[graylog.jar:?]
at org.elasticsearch.transport.netty.MessageChannelHandler.messageReceived(MessageChannelHandler.java:136) ~[graylog.jar:?]
at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(S

Keybase proof

I hereby claim:

  • I am madchap on github.
  • I am madchap (https://keybase.io/madchap) on keybase.
  • I have a public key ASB3vgpBRT_F1Ksp5mOJoJqwBVHjjdFtO6fCErcbKasEjAo

To claim this, I am signing this object:

# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
@madchap
madchap / unwrap failure
Last active October 23, 2018 21:58
missing client token on unwrap, hvac 0.6.4, vault 0.11.3.
def get_vault_token(vault_rolename):
# get role id from vault-tower
role_id_json = requests_wrap.get_data("{}{}/{}".format(vault_token_tower, "/roleid", vault_rolename))
role_id = role_id_json['role_id']
print("roleid: {}".format(role_id))
# get secret wrap from vault-tower
wrapped_token_json = requests_wrap.post_data("{}{}/{}".format(vault_token_tower, "/wraptoken", vault_rolename))
wrapped_token = wrapped_token_json['wrap_token']
print("wrapped token: {}".format(wrapped_token))
{
"segments": {
"right": [
{%@@ if exists('/Users') @@%}
{
"function": "powerline.segments.common.players.spotify_apple_script"
},
{%@@ endif @@%}
{
"function": "powerline.segments.common.net.external_ip"
@madchap
madchap / dell_tb16_udev.md
Last active February 5, 2019 22:13
Dell TB16 Thunderbolt udev

When plugging my Dell XPS13 (9360) to my TB16, which is connected to 2x 4k monitors, I want to turn off my laptop monitor. When unplugging the laptop from the docking, I want to turn the laptop monitor back-on.

system info

4.20.2-1-default

NAME="openSUSE Tumbleweed"
# VERSION="20190126"
ID="opensuse-tumbleweed"
@madchap
madchap / bio.md
Last active July 8, 2023 11:45
Fred's bio

Meet Fred - a seasoned Product Security leader devoted to bringing practical and continuous security to organizations in a frictionless way. His expertise in securing the SDLC, security by default mindset and ability to put himself in engineering teams shoes help to foster strong partnerships that yield efficient solutions to infuse security in-band of engineering processes.

Before transitioning to Product Security, Fred spent many years working on the Ops engineering side of things in various industries and countries. This experience has given him a unique perspective on security, allowing him to approach it with empathy and a strong engineering angle.

Fred is an open-source enthusiast, Linux advocate, and a former maintainer of DefectDojo -- a flagship OWASP application vulnerability management project. He holds a master's degree in Business Intelligence and Databases from Boston University.

When not immersed in the world of security, Fred enjoys spending quality time with his wife and children in Switze

@madchap
madchap / unwatch.sh
Last active April 11, 2022 18:52
Unwatch all github repos from organization (unsubscribe)
# get api token with proper perms, ensure full "repos" for private repo access.
$ export auth="Authorization: token 123345465hfghfghfghgfhgfhfg"
$ export org="your_org"
# get the last page in the Link header. github API limits per_page to 100. Anything over this will require pagination.
$ curl -I -H "$auth" https://api.github.com/orgs/$org/repos
# go over all pages. Put this in a script, and save it.
#!/bin/bash
@madchap
madchap / 99-plugable-tbt3-udv-docking.rules.md
Last active June 20, 2020 17:16
Plugable TBT3-UDV Docking Station udev rules
@madchap
madchap / fblaise_cloudbees.pub
Created June 20, 2019 11:49
Cloubees public key
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBFx5Hv8BEAC8kktuNEDDzMVzzFVOWPd1ZuVkbsXlNV80HPzY0xYRyAQZGc8v
L+ZJqwmVVu86sBtkWio/w/MqBti4GTOqZpEioAc4HWlsFkpXsn0a+L5wtMcTppbr
otuVc/kY1H1IPtAIF/BE4eAT91JKMibErpiG1GswBTEmVwy5oa+oWoWYW/tInvs4
DLQl+1niy+sCRKNNSsEyzsyrAziLiobUq7wSq9sTouUMitkNF/sCiNOX7MOhG3GZ
iCN0xloVcJm/gaG4ibLrmuZiCYPXQYqE7NyStVsZaiheih9pTZuEJ6T89VZnT+nk
wEtvWgx52uyDAU/+VGQXSTC+wOSBn5XxL05+Z1Zm+LGEVvHHkU/UZ1H5pQJmErzc
cz7edlmg3IcZGF5gVCChr1xwv6d41QZwLdyuPAkXXdSi1wPn+utaxrf3eACn4g1P
B8CKdwyBzD6zq/5RXKLFPFpniyOUCg4ssRW6Sqo7LdMxsuciD022fqj8+jXB3gQU