This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python3 | |
# This script toggles the PulseAudio output sink of the currently active application (guessed by the currently active X window) between the given output sink and the default output sink. | |
# The output sink is passed as first argument to the script. | |
# | |
# Requirements: | |
# | |
# xdotool (on Ubuntu install via "sudo apt install xdotool") | |
# pulsectl ("sudo pip3 install pulsectl") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io._ | |
@SerialVersionUID(15L) | |
class Animal(name: String, age: Int) extends Serializable { | |
override def toString = s"Animal($name, $age)" | |
} | |
case class Person(name: String) | |
// or fork := true in sbt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import groovy.transform.CompileStatic | |
@CompileStatic | |
void swap(int[] a, int i, int j) { | |
int temp = a[i] | |
a[i] = a[j] | |
a[j] = temp | |
} | |
@CompileStatic |