View limit-number.py
def limit(num, minimum=1, maximum=255):
"""Limits input 'num' between minimum and maximum values.
Default minimum value is 1 and maximum value is 255."""
return max(min(num, maximum), minimum)
View favorite-keygen-music-playlist.md
Title File Name
greasy duck v1 AT4RE - Cool Rm to Mp3 Wav crk.mod
Spyware Firewall 2.0 crk.xm BugZ - Spyware Firewall 2.0 crk.xm
010 Editor 2.0 kg.xm Cafe - 010 Editor 2.0 kg.xm
2 Be With You CiB - Shokecake Games All Product crk.it
pullover DYNASTY - Autobahn Total - Die Verfolgungsjagd +2 trn.mod
GTA-S trn.xm Devious - GTA-S trn.xm
disco vering EMT36 - Instrument Tuner 3.0.001 crk.mod
ELiMiNATiON Keygen 1 EliMiNATiON - Super Mp3 Editor 4.2 kg.xm
View IsJVMOnDebugMode.java
/**
*
* -----------------------------------------------------------------------------------
* From : org.junit.rules.DisableOnDebug#isDebugging(java.util.List<java.lang.String>)
* -----------------------------------------------------------------------------------
*
* Parses arguments passed to the runtime environment for debug flags
* <p>
* Options specified in:
* <ul>
View logback-log-hibernate-params.xml
<logger name="org.hibernate.type" level="TRACE"/>
View MockFinalClass.java
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mockito;
import org.powermock.api.mockito.PowerMockito;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;
@RunWith(PowerMockRunner.class)
@PrepareForTest(MyFinalClass.class)
public class MyFinalClassTest {
View ZonedDateTimeAsUTC.java
/*
*
* Methods manipulate milliseconds field (fastTime) in java.util.Date object.
*
* UTC : 12/10/2017 11:15:00
* Local date time : 12/10/2017 14:15:00 +03:00
*
* @return new java.util.Date
* UTC : 12/10/2017 14:15:00
* Local date time : 12/10/2017 17:15:00 +03:00
View MockitoOtherwiseCaseStubbing.java
// Cover all `otherwise` cases first
doThrow(new IllegalArgumentException()).when(mockMessageSource).getMessage(any(String.class), any(Locale.class));
// after that specify requested legal case
doReturn("Merhaba Hayye").when(mockMessageSource).getMessage("hello.message.key", new Locale("tr"));
View find-inet-address.sh
ifconfig en0 | grep inet | grep -v inet6 | cut -d ' ' -f2
View iterm2-shell-integration-tools.txt
imgcat filename
Displays the image inline.
imgls
Shows a directory listing with image thumbnails
it2attention start|stop|fireworks
Gets your attention
it2check
Checks if the terminal is iTerm2
it2copy [filename]
Copies to the pasteboard