Skip to content

Instantly share code, notes, and snippets.

View maiklos's full-sized avatar

Michal Stekrt maiklos

  • freelancer
  • Czech republic - Prague
View GitHub Profile
@maiklos
maiklos / 0_reuse_code.js
Last active August 29, 2015 14:26
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
import java.text.*
def args = ["-c", "xxx", "-c", "yyy", "-c", "zzz", "-d", "ddd", "-h", "me", "quickly"]
def cli = new CliBuilder(usage: 'use me')
println ("args: $args")
cli.with {
c args: 3, argName: 'VALUEC', 'some value defined by "VALUEC"'
@maiklos
maiklos / gist:d0845338351cdc9bb7c6
Created September 12, 2014 11:15
maven settings.xml - mirror of local repo
<mirrors>
<mirror>
<id>internal-repository</id>
<name>Maven Repository Manager running on repo.mycompany.com</name>
<url>http://127.0.0.1:8080/nexus/content/groups/public/</url>
<mirrorOf>*</mirrorOf>
</mirror>
</mirrors>
@maiklos
maiklos / git aliases
Last active January 3, 2016 21:09
some useful git aliases
color.ui=true
alias.incoming=!git remote update -p; git log ..@{u}
alias.outgoing=log @{u}..
alias.lol=log --graph --decorate --pretty=oneline --abbrev-commit
alias.lola=log --graph --decorate --pretty=oneline --abbrev-commit --all --date=local
alias.ls=ls-files
alias.changed=log --pretty=format:%C(blue)%h%Cred%d\ %Creset%s%Cblue\ [%cn] --decorate --numstat
alias.lda=log --pretty=format:%C(blue)%h\ %ad%Cred%d\ %Creset%s%Cblue\ [%cn] --decorate --date=short
alias.ldaa=log --pretty=format:%C(blue)%h\ %ad%Cred%d\ %Creset%s%Cblue\ [%cn] --decorate --date=iso
alias.ldr=log --pretty=format:%C(blue)%h\ %ad%Cred%d\ %Creset%s%Cblue\ [%cn] --decorate --date=relative
@maiklos
maiklos / logback.xml
Created April 8, 2012 11:05
logback.xml
<configuration debug="true">
<appender name="stdout" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} %file:%line% %replace(%msg){'\d{14,16,13,10}', ';'} %n</pattern>
</encoder>
</appender>
<appender name="R" class="ch.qos.logback.core.rolling.RollingFileAppender">
<!--See also http://logback.qos.ch/manual/appenders.html#RollingFileAppender-->
<File>log/log.txt</File>
<encoder>