Skip to content

Instantly share code, notes, and snippets.

View jemc's full-sized avatar

Joe Eli McIlvain jemc

  • TheoremOne
  • Cascadia
View GitHub Profile
# List all mnesia tables used in the server.
rabbitmqctl eval 'mnesia:system_info(tables).'
# => [rabbit_exchange_type_consistent_hash,mirrored_sup_childspec,gm_group,
# rabbit_queue,rabbit_durable_queue,rabbit_runtime_parameters,
# rabbit_exchange_serial,rabbit_exchange,rabbit_durable_exchange,
# rabbit_topic_trie_binding,rabbit_topic_trie_edge,rabbit_topic_trie_node,
# rabbit_reverse_route,rabbit_route,rabbit_semi_durable_route,
# rabbit_durable_route,rabbit_listener,rabbit_vhost,rabbit_user_permission,
# rabbit_user,schema]
@jemc
jemc / gh-enable-all-inactivity-disabled-workflows.fish
Created October 20, 2023 15:14
Use GitHub CLI to enable all workflows that were disabled due to repository inactivity - either for all repos in a given org that you manage, or (by default) your personal repos.
function gh-enable-all-inactivity-disabled-workflows
set org $argv[1]
gh repo list $org | cut -f 1 | xargs -I REPO sh -c 'gh workflow list --all -R REPO | grep disabled_inactivity | cut -f 3 | xargs -I WORKFLOW sh -xc "gh workflow enable WORKFLOW -R REPO"'
end
@jemc
jemc / BigButton.qml
Last active August 5, 2023 09:26
Big Button example in QML using SVG and native layers
import QtQuick 2.0
import QtQuick.Controls 1.0
import QtQuick.Controls.Styles 1.0
import QtGraphicalEffects 1.0
Item {
height: 200
width: 200
@jemc
jemc / .mtpz-data
Created December 30, 2015 19:50
$HOME/.mtpz-data (extra data for libmtp MTPZ implementation)
10001
b1ce711c1e1b468784a08490d5962216
cad0d4c357342dd7ad959a5029d3d316972b9b9fe234f08ba7b6bff3b522505b16f52d218c693597b2840f90807a7f77899d7454dbc2011724d45603a136682c3b4fa43a21b201ff3d8efe16cdda5ea6d225dd74c68d09b84536d3b2292beb83d1d0dbb692261eeb2ebefeb21b1836c7e19864f4198ce84fe2033fbefcd377e5
79ee227b6da9c905a92e0f9fb205cf19fdb811cf85471e765755df00bd1cec025742fee6f46b2bf50f35a5c5d1f7d33a2259aede755fa5182ce41af203b199de2ba5cf801fcb4c8863b3c40cfdb18c9985ddad8710618802fd8969127c5f0fd52931f74a11082e27890cfbd11ae21b3611e54212d9e4269801f84d4f7e4ea601
02000001350100000000b501000000010000000000000000000000000000000000125a756e6520536f6674776172652043412031000100010080336ee6aa07bfb3ffd04024cec38be6497ef60e3d7f682e0ff15e6c65ff613bde176fad7137884e80a813cf53c3101aa51b9e4f54b24fd514cdc509b6b71e1f48513df06444d9b55963e8121c4c69b67d6a1314f973c9585c29bb990ad7fd151dbbcb4f9ed7dfe292ba4ed9c6acf58e6adeef5b877a1c1545742634916946459b094b259ed85ef02b08a318e67afd68c289a8c6a61bc8023ca87fe367bdcc0856c3d15758c866e53fb52e86ec569c9c070a2
@jemc
jemc / comp-sci-notation.md
Last active January 17, 2022 18:42
An informal glossary of formal notation commonly used in academic papers relevant to computer science

Overview

Laypersons who are not trained in the relevant formal notation may sometimes feel lost when trying to read academic papers on computer science.

This gist is intended to be a short introductory "cheat sheet" for some of the symbols we may encounter in such papers, to help make the work more accessible to a broader audience, particularly those working in the software industry looking to gain a deeper understanding into formal computer science.

In addition to this introductory glossary of symbols, it may also be helpful to reference this glossary of terms so that the formal usage of certain words can be known to the reader.

One can also read a great bit more detail on this topic in The Formal Semantics of Programming Languages, a text introducing a lot of details in formal notation.

interface val Auth
fun val apply[B: Auth val](): B ? =>
this as B
fun val add(that: Auth): AuthSet =>
AuthSet(this, that)
class val AuthSet is Auth
let _a: Auth
let _b: Auth
@jemc
jemc / docker_rabbitmqctl.md
Last active September 18, 2021 06:07
Controlling Docker RabbitMQ via rabbitmqctl

Example invocation of a RabbitMQ docker container (use -d instead of -t -i to run in the background):

sudo docker run -t -i --name rabbitmq -p 5672:5672 -p 15672:15672 rabbitmq:3-management

Example of controlling the rabbitmq-server inside the container using rabbitmqctl (also inside the container).

sudo docker exec rabbitmq su rabbitmq -- /usr/lib/rabbitmq/bin/rabbitmqctl status
@jemc
jemc / .gitignore
Last active September 5, 2021 02:03
pony-sdl-wrapper
*.so
*.o
TAGS
pony-sdl-example
@jemc
jemc / docker-on-m1.md
Created February 13, 2021 13:19
Docker on M1

Follow instructions here to get qemu setup working

Keybase proof

I hereby claim:

  • I am jemc on github.
  • I am jemc (https://keybase.io/jemc) on keybase.
  • I have a public key whose fingerprint is 5055 37F5 8770 7D46 5A22 5D35 1858 AD28 B2A9 65CC

To claim this, I am signing this object: