Skip to content

Instantly share code, notes, and snippets.

View marioosh's full-sized avatar

Mariusz Nosiński marioosh

View GitHub Profile
# name: MyAgnoster - agnoster based theme, added behind and ahead commits amount
# agnoster's Theme - https://gist.github.com/3712874
#
# # README
#
# In order for this theme to render correctly, you will need a
# [Powerline-patched font](https://gist.github.com/1595572).
## Set this options in your config.fish (if you want to :])
# set -g theme_display_user yes
@marioosh
marioosh / pre_push
Created December 23, 2014 09:21
executing test before push to remote server
#!/bin/bash
CMD="sbt clean cleanFiles test"
echo ""
echo ">> You do not pass if any from tests will fail"
echo ""
$CMD
RESULT=$?
if [$RESULT -ne 0 ]; then
@marioosh
marioosh / Sample.scala
Last active August 29, 2015 14:05
String interpolation example
object Sample {
def main(args: Array[String]) {
println(xX"!dlrow olleh")
}
implicit class xXHelper(val sc: StringContext) extends AnyVal {
def xX(args: Any*): String =
sc.raw().reverse
@marioosh
marioosh / Grid.java
Created February 24, 2014 13:13
Grid class for sudoku solver
package sudoku;
/**
* Created with IntelliJ IDEA.
* User: marioosh
* Date: 23.02.2014
* Time: 21:34
*/
public class Grid {
@marioosh
marioosh / SudokuSolver.java
Created February 24, 2014 13:13
Sudoku Solver with choco, more at http://marioosh.5dots.pl
package sudoku;
import solver.Solver;
import solver.constraints.IntConstraintFactory;
import solver.search.strategy.IntStrategyFactory;
import solver.variables.IntVar;
import solver.variables.VariableFactory;
import util.tools.ArrayUtils;
/**
@marioosh
marioosh / deleteVertexTest.java
Created July 11, 2013 12:18
Test for delete verticies in orientDB 1.4.1
import com.orientechnologies.orient.core.sql.OCommandSQL;
import com.tinkerpop.blueprints.Direction;
import com.tinkerpop.blueprints.Vertex;
import com.tinkerpop.blueprints.impls.orient.OrientGraph;
import org.junit.Test;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
@marioosh
marioosh / devise.pl.yml
Created March 28, 2011 21:04
Devise polish translation, for version 1.2 and up
# Works with devise 1.2 rails 3 (rails 2 not tested)
pl:
errors:
messages:
not_found: "nie znaleziono"
already_confirmed: "już został aktywowany"
not_locked: "nie był zablokowany"
not_saved:
one: "%{resource} nie został zapisany z powodu jednego błędu:"