Skip to content

Instantly share code, notes, and snippets.

@EHJ-52n
EHJ-52n / testing_impl-gda.R
Created May 16, 2019 10:23
sos4R::Tests for GDA implementation
#
# Load dev version of sos4R ----
#
devtools::load_all()
webmockr::disable()
#
# VARIABLES----
#
.verbose <- TRUE
.saveOriginal <- FALSE
@noerw
noerw / READM.md
Created August 31, 2018 11:04
Kibana 6.4 read only access

Kibana 6.4 read only access

warning: this list of endpoints was discovered empirically

in case you want to restrict Kibana access to read only, whitelist the following endpoints:

  • GET /app/kibana
  • GET /bundles/*
  • GET /plugins/*
  • GET /api/saved_objects/_find
@hannob
hannob / squirrelmail-fix-file-disclosure.diff
Created March 14, 2018 16:23
squirrelmail quick fix for file disclosure vuln presented at Troopers 2018 (#TR18)
--- squirrelmail.stable/squirrelmail/class/deliver/Deliver.class.php 2017-01-27 21:31:33.000000000 +0100
+++ htdocs/class/deliver/Deliver.class.php 2018-03-14 17:21:10.320000000 +0100
@@ -281,6 +281,7 @@
global $username, $attachment_dir;
$hashed_attachment_dir = getHashedDir($username, $attachment_dir);
$filename = $message->att_local_name;
+ if(!ctype_alnum($filename)) die();
// inspect attached file for lines longer than allowed by RFC,
// in which case we'll be using base64 encoding (so we can split
@joseluisq
joseluisq / stash_dropped.md
Last active May 12, 2024 16:23
How to recover a dropped stash in Git?

How to recover a dropped stash in Git?

1. Find the stash commits

git log --graph --oneline --decorate ( git fsck --no-reflog | awk '/dangling commit/ {print $3}' )

This will show you all the commits at the tips of your commit graph which are no longer referenced from any branch or tag – every lost commit, including every stash commit you’ve ever created, will be somewhere in that graph.

@khoubyari
khoubyari / jackson-test
Created June 4, 2015 00:21
Jackson JSON (De)Serialization Test
public abstract class AbstractJackson2MarshallingTest {
protected ObjectMapper mapper;
@Before
public void setUp() {
mapper = new ObjectMapper();
mapper.enable(SerializationFeature.INDENT_OUTPUT);
}