Skip to content

Instantly share code, notes, and snippets.

@danilobatistaqueiroz
danilobatistaqueiroz / amqp_vs_jms.md
Last active August 6, 2024 08:48
Redis vs AMQP vs JMS vs Kafka

AMQP vs JMS

JMS: only java, it is a specification
AMPQ: universal, it is a protocol, it is open standard for messaging

JMS doesn't define a protocol.

JMS is an API and AMQP is a protocol.

AMQP supports 4 message models: Direct, Fanout, Topic, Headers

@ryderdamen
ryderdamen / triggering_cron_job_manually_on_kubernetes.md
Last active March 6, 2024 15:07
How to trigger a Cron Job manually on Kubernetes

Triggering a Cron Job manually on Kubernetes

So you've defined a cronjob.yaml manifest, but it doesn't run until midnight and you want to test it now? Simply replace the variables, and run the following command to create a job from the cronjob.

kubectl create job --from=cronjob/{{ cron_job_name }} {{ the-name-of-this-one-off-job }}

This will create a one-off job in your cluster based on your cronjob.yaml manifest, which might look something like this.

apiVersion: batch/v1beta1
@matthewriley
matthewriley / Git290onRHEL7x.md
Created June 15, 2016 18:59
Install Git 2.9.0 from source on RHEL 7.x

Install Git 2.9.0 from source on RHEL 7.x

These are the Terminal commands I recently used (June 2016) to install Git 2.9.0 from source on RHEL 7.x. I ran this in a VirtualBox VM after a fresh install from the ISO.

You mileage will vary as the yum packages are updated over time. The yum install line below should include all the dependencies, at least it did for me. Depending upon how often you use yum update you may need to run yum --enablerepo=base clean metadata as su before you run the following commands.

cd ~/Downloads
su
yum install autoconf cpio curl-devel expat-devel gcc gettext-devel make openssl-devel perl-ExtUtils-MakeMaker zlib-devel
wget -O v2.9.0.tar.gz https://github.com/git/git/archive/v2.9.0.tar.gz
@nvbn
nvbn / bf_2.clj
Last active June 19, 2021 12:29
bf_2.clj
(ns bf.core)
(defmulti run-symbol
(fn [symbol _] symbol))
(defmethod run-symbol \+
[_ {:keys [pos] :as state}]
(update-in state [:stack pos] inc))
(defmethod run-symbol \-
@staltz
staltz / introrx.md
Last active September 16, 2024 07:18
The introduction to Reactive Programming you've been missing
@chaitanyagupta
chaitanyagupta / _reader-macros.md
Last active September 12, 2024 16:16
Reader Macros in Common Lisp

Reader Macros in Common Lisp

This post also appears on lisper.in.

Reader macros are perhaps not as famous as ordinary macros. While macros are a great way to create your own DSL, reader macros provide even greater flexibility by allowing you to create entirely new syntax on top of Lisp.

Paul Graham explains them very well in [On Lisp][] (Chapter 17, Read-Macros):

The three big moments in a Lisp expression's life are read-time, compile-time, and runtime. Functions are in control at runtime. Macros give us a chance to perform transformations on programs at compile-time. ...read-macros... do their work at read-time.

@dholbrook
dholbrook / Tree.scala
Created June 21, 2012 17:59
Scala binary tree
/**
* D Holbrook
*
* Code Club: PO1
*
* (*) Define a binary tree data structure and related fundamental operations.
*
* Use whichever language features are the best fit (this will depend on the language you have selected). The following operations should be supported:
*
* Constructors
@lowstz
lowstz / install-jdee.sh
Created February 28, 2012 19:55
A simple script to install JDE for Emacs (JDEE)
#!/bin/sh
# Change `ELISP_DIR` variable as you needed
ELISP_DIR="$HOME/.emacs.d/site"
MIRROR="https://lowstz.org/jdee"
echo -n "This script require wget and unzip, please ensure that your system has been installed them?[yes/no]:"
read choice
case $choice in
YES|yes|Y|y)