Skip to content

Instantly share code, notes, and snippets.

View kubadlo's full-sized avatar

Jakub Leško kubadlo

View GitHub Profile
@kubadlo
kubadlo / ublock_filters.txt
Created November 11, 2021 09:15
My list of cosmetic filters for uBlock origin
! 2021-10-20 https://outlook.live.com
outlook.live.com##._1fti_QgAzqGWPGlqh_FSvI
outlook.live.com##._28ithXDZzMqSN0YAG2rCVn
@kubadlo
kubadlo / unaccent.js
Created June 12, 2020 09:53
Remove accents/diacritics in a string in JavaScript
const str = "ščíáýžľčéíľšéíľéšíťč";
str.normalize('NFD').replace(/[\u0300-\u036f]/g, "");
@kubadlo
kubadlo / import_eml.vbs
Created September 26, 2019 09:10
Import *.eml files into any Outlook folder
'===================================================================
'Description: VBS script to import eml-files.
'
'Comment: Before executing the vbs-file, make sure that Outlook is
' configured to open eml-files.
' Depending on the performance of your computer, you may
' need to increase the Wscript.Sleep value to give Outlook
' more time to open the eml-file.
' Make sure you have enabled "visible" file extensions in explorer.exe
'
@kubadlo
kubadlo / HttpStatusCode.ts
Created August 4, 2019 08:54 — forked from scokmen/HttpStatusCode.ts
Typescript Http Status Codes Enum
"use strict";
/**
* Hypertext Transfer Protocol (HTTP) response status codes.
* @see {@link https://en.wikipedia.org/wiki/List_of_HTTP_status_codes}
*/
enum HttpStatusCode {
/**
* The server has received the request headers and the client should proceed to send the request body
@kubadlo
kubadlo / GitCommitEmoji.md
Created May 7, 2019 13:43 — forked from parmentf/GitCommitEmoji.md
Git Commit message Emoji
@kubadlo
kubadlo / git-master.ps
Created April 28, 2019 17:48
Delete all branches in git except master
git branch | Select-String -NotMatch -Pattern "master" | %{ git branch -D $_.ToString().Trim() }
@kubadlo
kubadlo / birth-number.ahk
Last active March 1, 2019 16:17
Autohotkey function to generate Slovak birth number
; Function to generate birth numbers [Win + Shift + B]
#+b::GenerateBirthNum()
GenerateBirthNum()
{
Gender:
Random, Gender, 0, 1
Year:
Random, Year, 1970, FormatTime, CurrentDateTime,, yyyy
@kubadlo
kubadlo / PortletUtils.java
Last active October 17, 2018 11:21
Simple util class to create various URLs in Spring MVC controllers used in Liferay portlets.
package sk.o2.assistant.portlet.common.util;
import javax.portlet.PortletURL;
import javax.portlet.RenderResponse;
import javax.portlet.ResourceURL;
public final class PortletUtils {
private static final String PORTLET_ACTION_NAME = "javax.portlet.action";
@kubadlo
kubadlo / firefox_colors.md
Last active June 6, 2018 07:03
List of my favorite color settings for Firefox browser
@kubadlo
kubadlo / .editorconfig
Last active February 3, 2018 16:39
Java project defaults
# Top most editorconfig
root = true
# General configuration
[*]
indent_style = space
indent_size = 4
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true