jq is useful to slice, filter, map and transform structured json data.
brew install jq
# Comma separated list of channels | |
/set colorize_nicks.look.blacklist_channels "" | |
# Comma separated list of nicks | |
/set colorize_nicks.look.blacklist_nicks "so,root" | |
# Whether to colorize input | |
/set colorize_nicks.look.colorize_input off | |
# If off, then use lazy matching instead |
( | |
SynthDef(\impulseSync, { | |
|rate=1, bpm=135, barLengthInBeats=4, resetLength=1| | |
var reso = 96; | |
var clockFreqFull = bpm / 60 / barLengthInBeats * rate; | |
var clockFreq = clockFreqFull / resetLength; | |
var impSubDivs = Impulse.ar(clockFreqFull * barLengthInBeats * reso, 0); | |
var imp = PulseDivider.ar(impSubDivs, (barLengthInBeats * reso * resetLength).floor, barLengthInBeats * reso); | |
var clockPos = Phasor.ar(imp, clockFreqFull / SampleRate.ir, 0, 1, 0); var barCounter = PulseCount.ar(imp); | |
Out.ar(30, barCounter); |
;* | |
;* Gameboy Hardware definitions | |
;* | |
;* Based on Jones' hardware.inc | |
;* And based on Carsten Sorensen's ideas. | |
;* | |
;* Rev 1.1 - 15-Jul-97 : Added define check | |
;* Rev 1.2 - 18-Jul-97 : Added revision check macro | |
;* Rev 1.3 - 19-Jul-97 : Modified for RGBASM V1.05 | |
;* Rev 1.4 - 27-Jul-97 : Modified for new subroutine prefixes |
(defvar *foo*) ; a global variable *FOO* | |
(declaim (type (integer 0 10) *foo*)) ; type should be integer between range | |
(setf *foo* 30) ; kaboom |
;; run with | |
;; clj -Sdeps '{:deps {gdocs {:git/url "https://gist.github.com/souenzzo/df540002607b15378f8014237e499fdd" :sha "fee00617c75fc24c74931aa4200f74666c5b66b6"}}}' -m gdocs | |
{:paths ["."] | |
:deps {org.clojure/clojure {:mvn/version "1.10.0"} | |
com.google.api-client/google-api-client {:mvn/version "1.28.0"} | |
com.google.oauth-client/google-oauth-client-jetty {:mvn/version "1.28.0"} | |
com.google.apis/google-api-services-sheets {:mvn/version "v4-rev566-1.25.0"}}} |
Kafka 0.11.0.0 (Confluent 3.3.0) added support to manipulate offsets for a consumer group via cli kafka-consumer-groups
command.
kafka-consumer-groups --bootstrap-server <kafkahost:port> --group <group_id> --describe
Note the values under "CURRENT-OFFSET" and "LOG-END-OFFSET". "CURRENT-OFFSET" is the offset where this consumer group is currently at in each of the partitions.
(def results | |
(crux/q (crux-db) '{:find [discount-key company flow supplier-id | |
warehouse-id manufacturer-id discount | |
discount-type ?discount], | |
:where [[?discount :discount/company company] | |
[?discount :discount/flow flow] | |
[?discount :discount/supplier-id supplier-id] | |
[?discount :discount/warehouse-id warehouse-id] | |
[?discount :discount/discount discount] | |
[?discount :discount/manufacturer-id manufacturer-id] |
; A REPL-based, annotated Seesaw tutorial | |
; Please visit https://github.com/daveray/seesaw for more info | |
; | |
; This is a very basic intro to Seesaw, a Clojure UI toolkit. It covers | |
; Seesaw's basic features and philosophy, but only scratches the surface | |
; of what's available. It only assumes knowledge of Clojure. No Swing or | |
; Java experience is needed. | |
; | |
; This material was first presented in a talk at @CraftsmanGuild in | |
; Ann Arbor, MI. |