Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View shabanali-faghani's full-sized avatar

Shabanali Faghani shabanali-faghani

  • Tehran, Iran
View GitHub Profile
@msievers
msievers / [Spring, JMH] Howto integrate JMH benchmarks with Spring.md
Last active March 23, 2024 21:12
[Spring, JMH] Howto integrate JMH benchmarks with Spring

Motivation

Integrate JMH (Java Microbenchmarking Harness) with Spring (Boot) and make developing and running benchmarks as easy and convinent as writing tests.

Idea

Wrap the necessary JMH boilerplate code within JUnit to benefit from all the existing test infrastructure Spring (Boot) provides. It should be as easy and convinent to write benchmarks as it is to write tests.

TL;DR;

@hewerthomn
hewerthomn / install-oh-my-zsh.sh
Created January 26, 2017 11:30
Offline install of oh-my-zsh on Ubuntu
main() {
# Use colors, but only if connected to a terminal, and that terminal
# supports them.
if which tput >/dev/null 2>&1; then
ncolors=$(tput colors)
fi
if [ -t 1 ] && [ -n "$ncolors" ] && [ "$ncolors" -ge 8 ]; then
RED="$(tput setaf 1)"
GREEN="$(tput setaf 2)"
YELLOW="$(tput setaf 3)"
@rob-murray
rob-murray / add_intellij_launcer
Last active April 10, 2024 15:42
Add Intellij launcher shortcut and icon for ubuntu
// create file:
sudo vim /usr/share/applications/intellij.desktop
// add the following
[Desktop Entry]
Version=13.0
Type=Application
Terminal=false
Icon[en_US]=/home/rob/.intellij-13/bin/idea.png
Name[en_US]=IntelliJ
@mmdemirbas
mmdemirbas / LogFile.udl.xml
Created September 13, 2012 11:34
Custom log file syntax highlighting for Notepad++
<NotepadPlus>
<UserLang name="LogFile" ext="log">
<Settings>
<Global caseIgnored="yes" />
<TreatAsSymbol comment="no" commentLine="no" />
<Prefix words1="no" words2="no" words3="no" words4="no" />
</Settings>
<KeywordLists>
<Keywords name="Delimiters">[(0])0</Keywords>
<Keywords name="Folder+"></Keywords>