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
| web: lein run $PORT |
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
| (ns zookeeper-client | |
| "Examples of zookeeper-clj 0.9.1 library usage" | |
| (:require [zookeeper :as zk] | |
| [zookeeper.data :as data] | |
| [clojure.test :refer [deftest is run-tests]] | |
| [clojure.string :refer [join]] | |
| [clojure.edn :as edn])) | |
| (def zk-server-address "localhost:2181") | |
| (defn path [& names] (str "/" (join "/" names))) |
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
| (ns kafka-client | |
| "An example of clj-kafka 0.2.6-0.8 library usage" | |
| (:require [clj-kafka.core :as kafka] | |
| [clj-kafka.zk :as zk] | |
| [clj-kafka.consumer.zk :as zk-consumer] | |
| [clj-kafka.producer :as producer] | |
| [clojure.test :refer [is deftest run-tests]] | |
| [clojure.edn :as edn])) | |
| (def zk-config {"zookeeper.connect" "localhost:2181"}) |
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
| package localhost | |
| import Thread.sleep | |
| import org.apache.log4j.Logger.getLogger | |
| object KafkaLogging extends App { | |
| val logger = getLogger(KafkaLogging.getClass) | |
| import logger._ | |
| info("Start") |
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
| #!/usr/bin/env python | |
| # requires xpyb - XCB bindings for python | |
| import xcb | |
| import xcb.xproto | |
| from time import sleep | |
| from itertools import tee | |
| from functools import partial | |
| conn = xcb.connect() |
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
| # /etc/systemd/system/usb-wakeup-fix.service | |
| # sudo systemctl enable usb-wakeup-fix.service | |
| [Unit] | |
| Description=Disable wakeup on USB devices | |
| RequiresMountsFor=/proc/acpi/wakeup | |
| DefaultDependencies=no | |
| StopWhenUnneeded=yes | |
| Before=sleep.target |
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
| #!/usr/bin/env python3 | |
| from json import load | |
| from os import read | |
| from struct import Struct | |
| from subprocess import call | |
| from sys import argv, stdin | |
| from time import sleep | |
| def main(config_file): |
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
| #!/usr/bin/env sh | |
| cmd="${@:-sudo login -p -f player}" | |
| exec docker run -it --name gogbox --hostname gogbox \ | |
| --env="USER_UID=$(id -u)" \ | |
| --env="USER_GID=$(id -g)" \ | |
| --env="DISPLAY=${DISPLAY}" \ | |
| --volume=/run/user/$(id -u)/pulse:/run/pulse \ | |
| --volume=/tmp/.X11-unix:/tmp/.X11-unix \ | |
| --volume=/dev/dri/card0:/dev/dri/card0 --privileged \ | |
| gogbox:latest $cmd |