This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# List all the JARs in local Maven repository containing specified class. | |
# | |
# Usage: ./jarsearch.sh CLASSNAME | |
CLASSNAME="$1" | |
MAVEN_LOCAL_REPO="$HOME/.m2" | |
find "$MAVEN_LOCAL_REPO" -name "*.jar" | xargs -I{} bash -c "jar -tf {} | grep -q /${CLASSNAME}.class && echo {}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <string.h> | |
#define MAX_DATA_LEN 1024 | |
static unsigned char hex_string[MAX_DATA_LEN]; | |
static inline char convert_to_printable(char c) | |
{ | |
return c < 32 || c > 126 ? '.' : c; |