start new:
tmux
start new with session name:
tmux new -s myname
| -- show running queries (pre 9.2) | |
| SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
| FROM pg_stat_activity | |
| WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
| ORDER BY query_start desc; | |
| -- show running queries (9.2) | |
| SELECT pid, age(clock_timestamp(), query_start), usename, query | |
| FROM pg_stat_activity | |
| WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
| # Installation | |
| brew install ffmpeg --with-vpx --with-vorbis --with-libvorbis --with-vpx --with-vorbis --with-theora --with-libogg --with-libvorbis --with-gpl --with-version3 --with-nonfree --with-postproc --with-libaacplus --with-libass --with-libcelt --with-libfaac --with-libfdk-aac --with-libfreetype --with-libmp3lame --with-libopencore-amrnb --with-libopencore-amrwb --with-libopenjpeg --with-openssl --with-libopus --with-libschroedinger --with-libspeex --with-libtheora --with-libvo-aacenc --with-libvorbis --with-libvpx --with-libx264 --with-libxvid | |
| # Easy Peasy | |
| ffmpeg -i video.mp4 video.webm |
| xmlp |
| import groovy.json.JsonSlurper | |
| import org.springframework.test.web.servlet.MockMvc | |
| import static org.springframework.test.web.servlet.setup.MockMvcBuilders.* | |
| import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.*; | |
| import static org.springframework.http.HttpStatus.* | |
| import spock.lang.Specification | |
| /** | |
| * A Spock Spring MVC Rest unit test that doesn't require a full spring context | |
| */ |
After scouring the internet and piece-mealing together the correct way to do this, here is a step-by-step, all-in-one-place guide to making logback STFU when running your unit tests.
Save the following as logback-test.xml under src/test/resources:
<configuration>
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>%msg%n</pattern>| -server | |
| -Xms2g | |
| -Xmx2g | |
| -Xss16m | |
| -XX:+UseConcMarkSweepGC | |
| -XX:+CMSParallelRemarkEnabled | |
| -XX:ConcGCThreads=4 | |
| -XX:ReservedCodeCacheSize=128m | |
| -XX:+AlwaysPreTouch | |
| -XX:+TieredCompilation |
Table of Contents