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
package com.example.demo; | |
import org.apache.kafka.clients.consumer.ConsumerRecord; | |
import org.apache.kafka.clients.producer.Producer; | |
import org.apache.kafka.clients.producer.ProducerRecord; | |
import org.apache.kafka.common.serialization.StringDeserializer; | |
import org.apache.kafka.common.serialization.StringSerializer; | |
import org.junit.jupiter.api.AfterAll; | |
import org.junit.jupiter.api.BeforeAll; | |
import org.junit.jupiter.api.Test; |
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
# Create the container - we run 'echo' in the container, and reuse the same as we will be running later | |
docker run -d -v /data --name redis.data dockerfile/redis echo Data-only container for Redis | |
# the data container doesn't show up - nothing is running | |
docker ps | |
# will show 'redis.data', but as stopped | |
docker ps -a | |
# start redis, attach to 'redis.data' | |
docker run -d -p 6379:6379 --volumes-from redis.data --name ca.redis.1 dockerfile/redis |
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
#!/bin/bash | |
sudo kextunload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport | |
sudo kextload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport |
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 bash | |
function quit { | |
exit | |
} | |
function createTag(){ | |
echo "Changing to master branch for $1" | |
cd "/$1" | |
git status |
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
require 'mysql2' | |
begin | |
# you should fill those empty places inorder to read from the database | |
db = Mysql2::Client.new(:host => "localhost", :username => "", :password => "", :database => "") | |
# update table_name with the table name you created | |
@results = db.query("SELECT * FROM table_name") | |
command ||= "" |