Skip to content

Instantly share code, notes, and snippets.

@rahulsom
rahulsom / restart-audio-daemon.sh
Created December 10, 2016 19:09
Restart Audio Daemon
# All this comes from https://twitter.com/viktorklang/status/807629003385237504
function restart_audio() {
command sudo killall coreaudiod && \
sudo launchctl unload /System/Library/LaunchDaemons/com.apple.audio.coreaudiod.plist && \
sudo launchctl load /System/Library/LaunchDaemons/com.apple.audio.coreaudiod.plist || \
return
echo 'Audio daemon restarted'
}
@rahulsom
rahulsom / .gitignore
Last active April 5, 2018 21:49
Shorter Pretty Printed JSON
.idea
out/
.idea_modules/
*.iml
@rahulsom
rahulsom / .gitignore
Last active July 21, 2022 13:17
Protocol Buffers as a format for FHIR data
# Created by .ignore support plugin (hsz.mobi)
### JetBrains template
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff:
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/dictionaries
@rahulsom
rahulsom / demo.adoc
Created January 29, 2018 05:08
Asciidoctor source with attributes subs bug demo

Demo

This works, but is not ideal

build.gradle.kts
buildscript {
    dependencies {
@rahulsom
rahulsom / json2gclass.groovy
Last active February 9, 2022 00:08
Convert JSON to Groovy Class
import groovy.json.JsonSlurper
import groovy.transform.Field
def json = new JsonSlurper().parse(System.in)
if (!(json instanceof Map)) {
System.err.println "Input was not json"
System.exit 1
}
@rahulsom
rahulsom / setup.sh
Last active November 4, 2021 20:25
Setup new mac
#!/bin/bash
set -e
# Install OhYourDotfiles
cd $HOME
git clone https://github.com/DanielThomas/oh-your-dotfiles.git .oh-your-dotfiles
ln -s ~/.oh-your-dotfiles/oh-your.zshrc ~/.zshrc