for j in *.jar; do echo $j:; jar -tvf "$j" | grep -Hsi ClassName; done
- Iterate over every jar in your folder.
- Output every JAR Name (to match found classes to JARs lateron)
- List Content of every JAR ( jar -tvf “$j” )
- Grep for that specific ClassName grep -Hsi ClassName
Original Post: https://coderwall.com/p/7d-mta/find-a-class-in-a-bunch-of-jar-files
Let’s say you want to tunnel an RDP connection via SSH.
ssh -L13389:win2k8.example.com:3389 firstname.lastname@example.org
You need to run that script and keep your session open.
You can then access the remote System with a RDP Client over localhost 13389.
Original Post: https://coderwall.com/p/wzvxhg/ssh-tunnel-rdp-session-over-another-host
If you installing cocoapods on a vanilla MacOS System you might get some error like this:
# sudo gem install cocoapods
Building native extensions. This could take a while...
ERROR: Error installing cocoapods:
ERROR: Failed to build gem native extension.
gcc -I. -I/usr/local/include/ruby-1.9.1/x86_64-darwin10.6.0 -I/usr/local/include/ruby-1.9.1/ruby/backward -I/usr/local/include/ruby-1.9.1 -I. -DJSON_GENERATOR -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -D_XOPEN_SOURCE=1 -fno-common -pipe -O3 -Wall -O0 -ggdb -o generator.o -c generator.c
gcc -dynamic -bundle -o generator.bundle generator.o -L. -L/usr/local/lib -L. -L/usr/local/lib -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -Wl,-flat_namespace -lruby.1.9.1 -lpthread -ldl -lobjc
/opt/local/bin/gmkdir -p /usr/local/lib/ruby/gems/1.9.1/gems/json-1.8.0/ext/json/ext/generator/.gem.20130925-59217-5zt5ke/json/ext
make: /opt/local/bin/gmkdir: No such file or directory
make: *** [/usr/local/lib/ruby/gems/1.9.1/gems/json-1.8.0/ext/json/ext/generator/.gem.20130925-59217-5zt5ke/json/ext] Error 1
The important error is make: /opt/local/bin/gmkdir: No such file or directory
You need to install coreutils for fixing this.
sudo port install coreutils
sudo brew install coreutils
Original Post: https://coderwall.com/p/ehijxg/fixing-error-installing-cocoapods-on-macos
Deploy your JAR to your local (file) Repository. You shold also commit this to your CVM System. You can also add JARs as Javadoc or Source.
mvn deploy:deploy-file \
( -Dclassifier=javadoc | sources )
You can now use these JARs in your pom File if they were in a normal Repository:
Original Post: https://coderwall.com/p/r28cew/use-3rd-party-dependencies-in-maven-project
Sometimes, you would like to have Mapping Char to Int ( A = 0, B = 1, etc.)
One easy way to do this is using indexOf
// returns 5
Original Post: https://coderwall.com/p/ql-wng/map-char-to-alpha-position-with-java