Skip to content

Instantly share code, notes, and snippets.

Adam Batkin abatkin

Block or report user

Report or block abatkin

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
abatkin /
Last active Sep 2, 2019
Raspberry Pi Setup

Basic Setup

  • Download Raspbian (I used the "Lite" variant)
  • Copy to SD Card
% dmesg # to figure out which device is being used
% dd bs=4M if=2019-07-10-raspbian-buster-lite.img of=/dev/sdc conv=fsync status=progress
  • Mount boot partition and create file ssh
abatkin /
Created May 26, 2017
Make Citrix Receiver and Storefront usable on Linux

In order to make Citrix Receiver on Linux function nicely, I have modified the following settings in ~/.ICAClient/All_Regions.ini:

  • In [Virtual Channels\Seamless Windows]:
    • Set TWIMode=FALSE
    • This forces the window into true Fullscreen mode (as opposed to Seamless mode where the window happens to be fullscreen - there is a big difference!)
  • In [Virtual Channels\Mouse]:
    • Set MouseSendsControlV=False
    • This makes the middle mouse button function as a middle mouse button (as opposed to sending Ctrl+V, which I can't imagine anyone on Earth would actually want)
  • In [Virtual Channels\Keyboard]:
    • Set TransparentKeyPassthrough=FullScreenOnly
abatkin /
Last active May 22, 2017
OpenVPN Setup on CentOS or RHEL 7

This document is based on an older DigitalOcean document:

  • Install openvpn: yum install openvpn
  • Install easy-rsa (for your own CA): yum install easy-rsa
  • Configure openvpn:
    • Find location of the sample server.conf file from the openvpn distribution and copy to /etc/openvpn/server: cp /usr/share/doc/openvpn-2.4.2/sample/sample-config-files/server.conf /etc/openvpn/server
    • Edit the configuration file and uncomment the following lines:
      • `toplogy subnet
      • comp-lzo
      • user nobody
abatkin / IntelliJ.MD
Last active Jul 2, 2018
IntelliJ IDEA Customizations
View IntelliJ.MD

IntelliJ IDEA Customizations

This file describes the customizations that I have made to my IntelliJ installation:

  • Editor -> File and Code Templates -> Includes -> File Header: Empty
  • Editor -> General -> Uncheck "Honor "CamelHumps" words settings when selecting on double click
  • Editor -> General -> Smart Keys -> Check "Use "CamelHumps" words"


abatkin /
Last active Apr 27, 2016
XFCE on Fedora 23


This is my description of what I did to customize a base install of the Fedora 23 XFCE spin to my needs.


Apparently there is some sort of bug the the Nouveau driver with dual monitors (at least on the GTX 750). So step 1 was to unplug one of my monitors. I didn't really customize anything, but as soon as it was done installing, I installed the propriatary NVidia drivers. I'm a big Free Software fan, but sometimes I need to Get Things Done and the fact is that the Nouveau drivers kinda suck (also they don't work in my setup).

abatkin /
Created Jul 31, 2015
Tomcat Access valve for populating User Principal from remote header (from Spring Boot)
public EmbeddedServletContainerCustomizer containerCustomizer() {
return new EmbeddedServletContainerCustomizer() {
public void customize(ConfigurableEmbeddedServletContainer factory) {
if (factory instanceof TomcatEmbeddedServletContainerFactory) {
TomcatEmbeddedServletContainerFactory containerFactory = (TomcatEmbeddedServletContainerFactory) factory;
containerFactory.addContextValves(new ValveBase() {
public void invoke(Request request, Response response) throws IOException, ServletException {
abatkin /
Last active Mar 23, 2019
Make Gnome 3.0 Usable (Fedora 20)

Basic System

This set of documents explains how I make a "usable" developer system using Fedora under various desktop environments. This was all tested with Fedora 20.

  • Update all packages
  • Fix dumb GTK+ 3 Scrollbar behavior:
# Add to .config/gtk-3.0/settings.ini:
abatkin / listize.vim
Created May 6, 2013
Map \q to quote each line Map \j to join lines with a comma Map \s to quote and join all lines Works in visual mode only Great for taking a list of things and quoting for use in an SQL query
View listize.vim
vnoremap <leader>q :<c-u>call <SID>QuoteLines()<cr>
vnoremap <leader>j :<c-u>call <SID>JoinLines()<cr>
vmap <leader>s <leader>qgv<leader>j
function! s:JoinLines()
silent! execute "normal! gv:\<c-u>'<,'>-1s/\\v$/,/g\<cr>gvJ"
function! s:QuoteLines()
silent! execute "normal! gv:s/\\v(^\\s*)([^[:space:]].{-})(\\s*$)/\\1'\\2'\\3/\<CR>"
abatkin /
Created Feb 15, 2013
School class with hashCode() and equals() From a challenge at
* A few assumptions:
* * School is immutable (otherwise, implementing hashCode/equals doesn't really make sense)
* * The problem is incompletely specified, with respect to how to handle missing values:
* * What do you do when both name and nickname are null?
* * What if one School has a name + nickname and the other has just a name, but the names match?
* My decision (and I think this is reasonable) is: Both must match. If a value is null in one,
* it must be null in the other to be considered equal
class School {
You can’t perform that action at this time.