Skip to content

Instantly share code, notes, and snippets.

View GreyTeardrop's full-sized avatar

Mykola Rybak GreyTeardrop

  • Ukraine, Kyiv
  • 07:35 (UTC +03:00)
View GitHub Profile

Keybase proof

I hereby claim:

  • I am greyteardrop on github.
  • I am grey_teardrop (https://keybase.io/grey_teardrop) on keybase.
  • I have a public key ASDbBmBWQ3WF4itAvMCGdiY2H8iNleIwAWGX8d01N8825Qo

To claim this, I am signing this object:

@GreyTeardrop
GreyTeardrop / checkstyle-gsoc-build.log
Created August 24, 2014 14:02
Build failures of mvn -Pdistro package build of https://github.com/sabaka/checkstyle/tree/gsoc with JDK 1.8
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:01 min
[INFO] Finished at: 2014-08-24T16:59:01+03:00
[INFO] Final Memory: 74M/479M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.3:site (gen-site) on project checkstyle: Error during page generation: Error rendering Maven report:
[ERROR] Exit code: 1 - D:\Download\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\api\Check.java:29: error: invalid uri: "./{@docRoot}/../writingchecks.html"
[ERROR] * @see <a href="./{@docRoot}/../writingchecks.html" target="_top">Writing
@GreyTeardrop
GreyTeardrop / 0_reuse_code.js
Created October 7, 2013 23:32
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
@GreyTeardrop
GreyTeardrop / core.clj
Last active December 16, 2015 04:39
Tic Tac Toe Tomec
(ns tic-tac-toe-tomec.core
(:require [teardrop.codejam.core :as jam]
[clojure.string :as str])
(:gen-class))
(def board-size 4)
(defn rows [board]
board)
package crystal.rabbit.data;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
@GreyTeardrop
GreyTeardrop / override-web.xml
Created March 29, 2012 22:01
Maven servlet project
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0">
<servlet>
<servlet-name>default</servlet-name>
<servlet-class>org.eclipse.jetty.servlet.DefaultServlet</servlet-class>
<init-param>
<param-name>welcomeServlets</param-name>
@GreyTeardrop
GreyTeardrop / Stack.java
Created March 27, 2012 14:38
Stack project
package teardrop.stack;
public class Stack<T> {
/**
* Adds the element to the top of the stack.
*/
public void push(T element) {
}
/**
import java.util.Locale;
import java.util.prefs.Preferences;
public class Main {
public static void main(String[] args) {
Preferences preferences = Preferences.userNodeForPackage(Main.class);
String userLanguage = preferences.get("userLanguage", null);
if (userLanguage != null) {
Locale userLocale = new Locale(userLanguage);
Locale.setDefault(userLocale);
@GreyTeardrop
GreyTeardrop / PopupWindow.java
Created March 14, 2012 13:53
ResourceBundle example
import java.util.ResourceBundle;
public class PopupWindow {
private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle("messages");
// ....
// ....
String message = RESOURCE_BUNDLE.getString("my.message.key");
try {
ourSessionFactory = new Configuration().
configure("/hibernate.cfg.xml").
buildSessionFactory(); //todo what method is new one?
} catch (Throwable ex) {
throw new ExceptionInInitializerError(ex);
}