Skip to content

Instantly share code, notes, and snippets.

Rahul Somasunderam rahulsom

Block or report user

Report or block rahulsom

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
rahulsom /
Last active Aug 15, 2019
Setup new mac
set -e
# Install OhYourDotfiles
git clone ~/.oh-your-dotfiles
ln -s ~/.oh-your-dotfiles/oh-your.zshrc ~/.zshrc
chsh -s /bin/zsh
# Uncomment this to switch to brew managed zsh
rahulsom / json2gclass.groovy
Last active May 29, 2018
Convert JSON to Groovy Class
View json2gclass.groovy
import groovy.json.JsonSlurper
import groovy.transform.Field
def json = new JsonSlurper().parse(
if (!(json instanceof Map)) {
System.err.println "Input was not json"
System.exit 1
rahulsom / demo.adoc
Created Jan 29, 2018
Asciidoctor source with attributes subs bug demo
View demo.adoc


This works, but is not ideal

buildscript {
    dependencies {
rahulsom / .gitignore
Last active Sep 13, 2018
Protocol Buffers as a format for FHIR data
View .gitignore
# Created by .ignore support plugin (
### JetBrains template
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
# Reference:
# User-specific stuff:
rahulsom / .gitignore
Last active Apr 5, 2018
Shorter Pretty Printed JSON
View .gitignore
# All this comes from
function restart_audio() {
command sudo killall coreaudiod && \
sudo launchctl unload /System/Library/LaunchDaemons/ && \
sudo launchctl load /System/Library/LaunchDaemons/ || \
echo 'Audio daemon restarted'
View wordlength.groovy
This is my solution to
Languages are hard. General assumptions:
1. What qualifies as a letter is hard to explain in some languages like most indic languages.
My definition of what comprises a letter is what takes up on character in UTF encoding.
2. Same applies to chinese. In Chinese there's symbols for the every letter that are unicode symbols.
That makes chinese almost similar to the decimal number system.
Q1. What's the smallest number to form an english sequence of 7?
7: [323 (three hundred twenty-three), 23 (twenty-three), 11 (eleven), 6 (six), 3 (three), 5 (five), 4 (four)]
rahulsom / sendhl7.groovy
Created Feb 22, 2016
Send HL7 Message from file to host:port
View sendhl7.groovy
import ca.uhn.hl7v2.DefaultHapiContext
import ca.uhn.hl7v2.HapiContext
def cli = new CliBuilder()
rahulsom / fs.css
Created Feb 12, 2016
CSS theme for Jenkins Delivery Pipeline to play well with Neo
View fs.css
body {
font-family: sans-serif;
background: #000000;
color: #fefefe;
font-size: 14px;
div.pipeline-loading-icon {
content: url("dark-load.gif");
rahulsom / TypeForm.groovy
Created Sep 26, 2015
Turn TypeForm data into asciidoctor documents
View TypeForm.groovy
* TypeForm.groovy
* Generates asciidoctor output by analyzing a TypeForm survey
* 1. Setup an environment variable TYPEFORM_KEY from the account page on TypeForm.
* 2. Run this script with one arg - the code for your survey, e.g. `cC5Ur1`
* 3. Use Asciidoctor output in StdOut to do whatever you need to do.
import groovy.json.JsonSlurper
You can’t perform that action at this time.