This file contains hidden or 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
| /** | |
| * Class that provides retrying functionality. Example: | |
| * <p></p> | |
| * <code> | |
| * Callable<String> callable = new Callable<String>() {..}; | |
| * String result = RetryableOperation.create(callable).retry(5, IOException.class); | |
| * </code> | |
| * | |
| * @param <T> the return type of the operation | |
| */ |
This file contains hidden or 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.util.function.Function; | |
| public class Reader<R, A> { | |
| private final Function<R, A> run; | |
| public Reader(Function<R, A> run) { | |
| this.run = run; | |
| } |
Assuming that the following environment variables are set:
KAFKA_HOMEwhere Kafka is installed on local machine (e.g./opt/kafka)ZK_HOSTSidentifies running zookeeper ensemble, e.g.ZK_HOSTS=192.168.0.99:2181KAFKA_BROKERSidentifies running Kafka brokers, e.g.KAFKA_BROKERS=192.168.0.99:9092
Start Zookepper and Kafka servers
Assuming that the following environment variables are set:
KAFKA_HOMEwhere Kafka is installed on local machine (e.g./opt/kafka)ZK_HOSTSidentifies running zookeeper ensemble, e.g.ZK_HOSTS=192.168.0.99:2181KAFKA_BROKERSidentifies running Kafka brokers, e.g.KAFKA_BROKERS=192.168.0.99:9092
Start Zookepper and Kafka servers
This file contains hidden or 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
| # Path to your oh-my-zsh installation. | |
| export ZSH=/Users/parnaderhajlaoui/.oh-my-zsh | |
| ZSH_THEME="robbyrussell" | |
| HYPHEN_INSENSITIVE="true" | |
| plugins=(copybuffer command-not-found mvn cp brew colorize sudo git docker docker-compose git-remote-branch man osx postgres sudo yarn gitignore copydir z zsh-autosuggestions) | |
| alias to='cd ~/Projects/' |
This file contains hidden or 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 $ivy.`org.typelevel::cats-core:2.1.1`, cats._, cats.implicits._ | |
| import $ivy.`io.monix::monix:3.0.0` | |
| import $ivy.`dev.zio::zio:1.0.0-RC12-1` | |
| import $ivy.`org.typelevel::cats-effect:2.1.2` | |
| import $ivy.`org.scalatest::scalatest:3.1.1`,org.scalatest._ | |
| import $ivy.`org.scalacheck::scalacheck:1.14.3` | |
| import $ivy.`io.chrisdavenport::cats-scalacheck:0.2.0-M1` | |
| import scala.concurrent.ExecutionContext.Implicits.global | |
| import scala.concurrent.duration._ | |
| import scala.concurrent.Future |
This file contains hidden or 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
| # Volume controls | |
| bindsym XF86AudioRaiseVolume exec --no-startup-id "pactl set-sink-volume @DEFAULT_SINK@ +5% && notify-send -u low -i audio-volume-high 'Volume' 'Volume raised to $(pamixer --get-volume)%'" | |
| bindsym XF86AudioLowerVolume exec --no-startup-id "pactl set-sink-volume @DEFAULT_SINK@ -5% && notify-send -u low -i audio-volume-low 'Volume' 'Volume lowered to $(pamixer --get-volume)%'" | |
| bindsym XF86AudioMute exec --no-startup-id "pactl set-sink-mute @DEFAULT_SINK@ toggle && notify-send -u low -i audio-volume-muted 'Volume' 'Mute toggled'" | |
| # Brightness controls | |
| bindsym XF86MonBrightnessUp exec --no-startup-id "brightnessctl set +5% && notify-send -u low -i display-brightness 'Brightness' 'Brightness increased to $(brightnessctl get)'" | |
| bindsym XF86MonBrightnessDown exec --no-startup-id "brightnessctl set 5%- && notify-send -u low -i display-brightness 'Brightness' 'Brightness decreased to $(brightnessctl get)'" |

