Skip to content

Instantly share code, notes, and snippets.

View LIttleAncientForestKami's full-sized avatar

Tomasz Borek LIttleAncientForestKami

View GitHub Profile
LIttleAncientForestKami / csp.html
Created December 8, 2023 14:30
Content Security Policy demo with XSS attack
<!doctype html>
<html lang="en">
<meta charset="UTF-8">
<title>XSS Demo</title>
<meta http-equiv="Content-Security-Policy" content="" />
LIttleAncientForestKami / readme.adoc
Last active January 2, 2023 22:11
Icons for VIFM

How to install icons

  1. Install vifm

  2. Install Nerd Fonts Mono

    mkdir -p ~/.local/share/fonts
    cd ~/.local/share/fonts && curl -fLo "IBM 3270 Nerd Font Complete.otf"
    cd ~/.local/share/fonts && curl -fLo "IBM 3270 Nerd Font Complete Mono.otf"
LIttleAncientForestKami /
Created October 24, 2018 09:10
Podroby - przykład (Mocking - an example)
* @author Tomasz @LAFK_pl Borek
class Adres {
String ulica;
short nrLokalu;
short nrDomu;
LIttleAncientForestKami /
Last active August 28, 2018 16:18
Vim learning resources

Why bother? Explained by Jim Dennis in accepted answer to a common question: 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 /
Created June 8, 2018 08:49
recenzowanie - lista


  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 /
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 /
Last active September 1, 2018 10:03
Rozczajka Freeminda
LIttleAncientForestKami /
Created May 22, 2018 21:04
ANSI colours in Java
enum ANSI {
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=""
LIttleAncientForestKami /
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