Skip to content

Instantly share code, notes, and snippets.

@thekalinga
thekalinga / spel-in-a-nutshell.md
Last active March 3, 2019 08:47
SPEL in a nutshell
class RootObject {
  private String prop;
  private Child child;
}

// with root object
JavaExpressionParser expressionParser = new SpelExpressionParser();
Expression expression = expressionParser.parseExpression("prop + #var + 'somethingelse'");
RootObject rootObject = new RootObject("whatever");
@thekalinga
thekalinga / Google cloud documentation, fat cleanup.user.js
Created February 25, 2019 17:38
Google cloud documentation cleanup script grasemonkey
// ==UserScript==
// @name Google cloud documentation, fat cleanup
// @namespace http://tampermonkey.net/
// @version 0.1
// @description
// @author You
// @match https://cloud.google.com/*
// @grant none
// ==/UserScript==
@thekalinga
thekalinga / Kubernetes documentation, fat cleanup.user.js
Created February 25, 2019 17:36
Kubernetes documentation webpage greasemonkey cleanup script
// ==UserScript==
// @name Kubernetes documentation, fat cleanup
// @namespace http://tampermonkey.net/
// @version 0.1
// @description
// @author You
// @match https://kubernetes.io/docs/*
// @grant none
// ==/UserScript==
@thekalinga
thekalinga / Spring Blog cleanup.user.js
Created February 25, 2019 17:35
Spring blog hide sidebar greasemonkey script
// ==UserScript==
// @name Spring Blog cleanup
// @namespace http://tampermonkey.net/
// @version 0.1
// @description
// @author You
// @match https://spring.io/blog/*
// @grant none
// ==/UserScript==
@thekalinga
thekalinga / firefox-ubuntu-webex.md
Last active November 22, 2018 13:11
How to configure webex on Ubuntu 16.04
  1. Download firefox from here. This version because after v52 Extended Support Release(ESR), firefox stopped supporting a cross platform protocol
  2. Extract firefox into ~/dev/utils/firefox-esr52-java-webex
  3. Download 32 bit JRE tar.gz from here
  4. Extract jre into ~/dev/utils/jre8
  5. Create folder named ~/.mozilla/plugins
  6. Create shortcut ln -s ~/dev/utils/jre1.8.0_191/lib/i386/libnpjp2.so ~/.mozilla/plugins/
  7. Install dependencies (32 bit version of libraries to make audio & others work)
sudo apt-get install libasound2:i386 libasyncns0:i386 libatk-wrapper-java-jni:i386 libflac8:i386 libgail-common:i386 libgail18:i386 libgif7:i386 libgl1-mesa-glx:i386 libglapi-mesa:i386 libgtk2.0-0:i386 libnspr4:i386 libnss3:i386 libogg0:i386 libpcsclite1:i386 libpulse0:i386 libsndfile1:i386 libvorbis0a:i386 libvorbisenc2:i386 libw
@thekalinga
thekalinga / VAAPI-hwaccel-encode-Linux-Ffmpeg&Libav-setup.md
Created July 12, 2018 07:15 — forked from Brainiarc7/VAAPI-hwaccel-encode-Linux-Ffmpeg&Libav-setup.md
This gist contains instructions on setting up FFmpeg and Libav to use VAAPI-based hardware accelerated encoding (on supported platforms) for H.264 (and H.265 on supported hardware) video formats.

Using VAAPI's hardware accelerated video encoding on Linux with Intel's hardware on FFmpeg and libav

Hello, brethren :-)

As it turns out, the current version of FFmpeg (version 3.1 released earlier today) and libav (master branch) supports full H.264 and HEVC encode in VAAPI on supported hardware that works reliably well to be termed "production-ready".

Installing Nvidia Graphics Driver and Cuda on Ubuntu

Remove any previously installed Nvidia drivers

$ sudo apt-get remove --purge nvidia-*
$ sudo apt-get autoremove
$ sudo apt-get autoclean

You can choose to install CUDA drivers from .deb file or .run file

Installing Nvidia Graphics Driver and Cuda on Ubuntu

Remove any previously installed Nvidia drivers

$ sudo apt-get remove --purge nvidia-*
$ sudo apt-get autoremove
$ sudo apt-get autoclean

You can choose to install CUDA drivers from .deb file or .run file

@thekalinga
thekalinga / Pencil settings.md
Last active June 14, 2018 14:35
Pencil color pallette

My starting color palette for pencil

Update gridcolorpicker.recentlyUsedColors inside ~/.pencil/config.json to #006600FF,#4f6228FF,#002060FF,#00a79dFF,#506875FF,#b0bbc0FF,#4dd087FF,#ffc232FF,#49aadfFF,#d35a85FF,#d11b22FF,#FF9900FF,#682e81FF,#754c29FF,#ec4220FF,#10253fFF

@thekalinga
thekalinga / README.md
Created May 20, 2018 23:40 — forked from bollwyvl/README.md
RevealJS SVG fragment presenter

SVG fragment builds for reveal.js

Basic use case

  • make an SVG (maybe in inkscape)
    • save it someplace reveal.js can find it (maybe next to your presentation)
    • figure out how to identify them (maybe use named layers)
  • in reveal.js/index.html
    • add reveal-svg-fragment.js as a dependency
    • in a <section> of reveal.js markup
  • add data-svg-fragment="" to something, e.g.