Skip to content

Instantly share code, notes, and snippets.

View johanrhodin's full-sized avatar

Johan Rhodin johanrhodin

View GitHub Profile
@baelter
baelter / validate_bindings.rb
Last active April 12, 2023 08:12
Finds broken bindings, possible bug in RabbitMQ
#!/usr/bin/env ruby
require "excon"
require "optparse"
require "json"
# Finds broken bindings, possibly bug in RabbitMQ.
# Check if any unrouted message was published to an exchange that should have routed it.
banner = "Usage: validate_bindings.rb username password hostname"
OptionParser.new do |opts|
# Custom history configuration
# Run script using:
# chmod u+x better_history.sh
# sudo su
# ./better_history.sh
echo ">>> Starting"
echo ">>> Loading configuration into /etc/bash.bashrc"
echo "HISTTIMEFORMAT='%F %T '" >> /etc/bash.bashrc
echo 'HISTFILESIZE=-1' >> /etc/bash.bashrc
@taliesinb
taliesinb / slider.html
Created April 25, 2013 23:34
Easily create jquery-based slider animations from Mathematica. Get "slider.m" and then try: exportSlider[Table[Plot[Sin[x]+Sin[(b/10)x+b],{x,1,100},ImageSize->500,AspectRatio->.4,PlotRange->{{0,100},{-2,2}}],{b,1,20,1}]] That will rasterize the graphics expressions and create a composite jpg in Directory[] with a unique name, and return a snippe…
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" >
<title>Slider example</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.10.2/jquery-ui.min.js"></script>
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/blitzer/jquery-ui.css" type="text/css" media="all" />
</head>