Skip to content

Instantly share code, notes, and snippets.


Tharindu Sathischandra tharindusathis

View GitHub Profile
View archlinux_install_vs_code_official
cd ~
git clone
cd visual-studio-code-bin/
makepkg -s
sudo pacman -U visual-studio-code-bin-*.pkg.tar.zst
tharindusathis / 56-language-selector-si.conf
Created Apr 4, 2021
Replace default font for Sinhala lang - ubuntu
View 56-language-selector-si.conf
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<match target="pattern">
<test name="lang">
<test qual="any" name="family">
tharindusathis /
Created Feb 15, 2021
Chromium command line arguments




/prefetch:# arguments to use when launching various process types. It has been observed that when file reads are consistent for 3 process launches with the same /prefetch:# argument, the Windows prefetcher starts issuing reads in batch at process launch. Because reads depend on the process type, the prefetcher wouldn't be able to observe consistent reads if no /prefetch:# arguments were used. Note that the browser process has no /prefetch:# argument; as such all other processes must have one in order to avoid polluting its profile. Note: # must always be in [1, 8]; otherwise it is ignored by the Windows prefetcher.


tharindusathis / git-commands.txt
Last active Feb 11, 2021
Favourite git commands.
View git-commands.txt
# update the origin
git remote set-url origin <new-remote>
# add another repo as a submodule
git submodule add <that-repo-url> <folder-name-for-submodule>
# clone with submodules
git clone --recursive <url>
# download All submodules
# hello... just a test function
hello_world() {
echo 'Hello there,' $1
# Key bindings
bind '"\C-f":"cd_with_fzf\n"'
bind '"\C-o":"open_with_fzf\n"'
tharindusathis / source.cpp
Created Jun 27, 2020
my c++ starter template ##cpp ##competitive
View source.cpp
#include <bits/stdc++.h>
using namespace std;
#define mp make_pair
#define fi first
#define se second
#define pb push_back
#define all(x) begin((x)), end((x))
#define rall(x) rbegin((x)), rend((x))
#define foru(i, a, n) for (int i = (int)(a); i <= (int)(n); ++i)
tharindusathis /
Created Jun 27, 2020
Drag an undecorated window of JavaFX ##javafx
private StackPane parentPane;
double xOffset;
double yOffset;
void handleOnMouseDraggedBtnCtrlMainView(MouseEvent event) {
Stage stage = ( Stage ) parentPane.getScene().getWindow();
stage.setX(event.getScreenX() + xOffset);
tharindusathis /
Created Jun 25, 2020
temporary deserializer ##spring ##java ##deserializer
public class AnimalDeserializer extends StdDeserializer<Animal>
ObjectMapper mapper;
public AnimalDeserializer( Class<?> vc, ObjectMapper mapper )
super( vc );
this.mapper = mapper;
tharindusathis /
Last active Jun 25, 2020
[BeanDeserializerModifier modifyDeserializer] #spring #jackson
private static ObjectMapper configureObjectMapper(
ObjectMapper objectMapper, boolean shouldIncludeRawResponses) {
if (shouldIncludeRawResponses) {
SimpleModule module = new SimpleModule();
module.setDeserializerModifier(new BeanDeserializerModifier() {
public JsonDeserializer<?> modifyDeserializer(DeserializationConfig config,
BeanDescription beanDesc,
JsonDeserializer<?> deserializer) {
if (Response.class.isAssignableFrom(beanDesc.getBeanClass())) {