Skip to content

Instantly share code, notes, and snippets.

View LIttleAncientForestKami's full-sized avatar

Tomasz Borek LIttleAncientForestKami

View GitHub Profile
@LIttleAncientForestKami
LIttleAncientForestKami / gef.target
Created August 26, 2017 13:47
GEF (4) target file
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde version="3.8"?>
<target name="gef-integration" sequenceNumber="1">
<locations>
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.xtext.sdk.feature.group" version="2.10.0.v201605250459"/>
<unit id="org.eclipse.emf.sdk.feature.group" version="2.12.0.v20160526-0356"/>
<unit id="org.eclipse.sdk.ide" version="4.6.0.I20160606-1100"/>
<repository location="http://download.eclipse.org/releases/neon"/>
</location>
@LIttleAncientForestKami
LIttleAncientForestKami / sdkman-prep.sh
Last active February 16, 2018 14:35
Setting up Java on new Debian-based box
sudo apt install curl zip unzip
curl -s "https://get.sdkman.io" | bash
# source sdkman here
@LIttleAncientForestKami
LIttleAncientForestKami / Main.java
Created February 14, 2018 09:44
Hazelcast training
package com.hazelcast;
public class Main {
public static void main(String[] args) {
// Add necessary code to start up a Hazelcast instance and
// run the application multiple times to cluster them up
}
}
@LIttleAncientForestKami
LIttleAncientForestKami / pom.xml
Last active September 24, 2023 15:41
Maven POM with UTF8 encoding, compiler props, maven plugins (compiler, resources, jar) and sources for why
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>pl.lafk</groupId>
<artifactId>#APP</artifactId>
<version>0.1</version>
<name>#NAME</name>
@LIttleAncientForestKami
LIttleAncientForestKami / ANSI.java
Created May 22, 2018 21:04
ANSI colours in Java
package pl.edu.lafk.colours;
enum ANSI {
RESET("\u001B[0m"),
BLACK("\u001B[30m"),
RED("\u001B[31m"),
GREEN("\u001B[32m"),
YELLOW("\u001B[33m"),
BLUE("\u001B[34m"),
PURPLE("\u001B[35m"),
@LIttleAncientForestKami
LIttleAncientForestKami / start.md
Last active September 1, 2018 10:03
Rozczajka Freeminda
@LIttleAncientForestKami
LIttleAncientForestKami / Java4Maven.md
Created June 7, 2018 14:17
Maven and Java solutions

Maven and Java:

Diagnosis first:

echo "Path (since javac should be on it): $PATH"
echo "JAVA_HOME (since it overrides path): $JAVA_HOME"
  # consider also 
which java
  # and follow the links to find which Java you are using
java -version
@LIttleAncientForestKami
LIttleAncientForestKami / lista.md
Created June 8, 2018 08:49
recenzowanie - lista

Migawki

  1. opisy - "dlaczego", nie "co" czy "jak"?
  2. Czy migawki się powtarzają? - git log --format="%B" | sort | uniq -c | head
  3. Czy ich opisy są użyteczne?
  4. długość opisów? - git log --format="%B" > l; awk '{ print length($0); }' l | sort -n, do CSV i rób wykres i licz średnią
  5. spójność opisów (te same nazwy, styl)? - git log --format="%B" | sort
  6. czas teraźniejszy w nich? - j.w.
  7. opisy odwołują się do czegoś (kwitów, konkretnych poprawek, recek, komciów, wymagań)?
  8. % rozległych?
  9. Ile % migawek ma pliki znikąd?
@LIttleAncientForestKami
LIttleAncientForestKami / VimLearning.md
Last active August 28, 2018 16:18
Vim learning resources

Why bother? Explained by Jim Dennis in accepted answer to a common question: https://stackoverflow.com/questions/1218390/what-is-your-most-productive-shortcut-with-vim which actually ponders why bother with VIM if it breaks "the default" Ctrl+f, Ctrl+C, Ctrl+V, Ctrl+A that one learned from other (usually MS) tools...

Absolute basics and necessary

vimtutor -> man vim -> and when in Vim ':help whatever-you-need-help-on'.

Also, echo "set nocompatible" >> ~/.vimrc so that your Vim acts like Vim and not like VI. >> appends, to not overwrite if you already had a Vim config file (.vimrc).

Getting practice

@LIttleAncientForestKami
LIttleAncientForestKami / Adres.java
Created October 24, 2018 09:10
Podroby - przykład (Mocking - an example)
package pl.edu.lafk.tdd.podroby;
/**
* @author Tomasz @LAFK_pl Borek
*/
class Adres {
String ulica;
short nrLokalu;
short nrDomu;