Skip to content

Instantly share code, notes, and snippets.

View mhucka's full-sized avatar

Michael Hucka mhucka

View GitHub Profile
@mhucka
mhucka / gist:567e1030c3b1de8c3b98c7d82778a957
Created September 6, 2021 15:21
Code shown in the "Default – MathJax 3" tab of the section on "Loading MathJax" at https://facelessuser.github.io/pymdown-extensions/extensions/arithmatex/#loading-mathjax
window.MathJax = {
options: {
ignoreHtmlClass: 'tex2jax_ignore',
processHtmlClass: 'tex2jax_process',
renderActions: {
find: [10, function (doc) {
for (const node of document.querySelectorAll('script[type^="math/tex"]')) {
const display = !!node.type.match(/; *mode=display/);
const math = new doc.options.MathItem(node.textContent, doc.inputJax[0], display);
const text = document.createTextNode('');
@mhucka
mhucka / app.py
Last active September 6, 2022 23:55
Simple web server that echoes GET and POST content to stdout
'''
app.py: Simple web server that echoes GET and POST content to stdout
Usage
-----
1. Save this content into a file named "app.py"
2. Make sure you have Flask installed: "pip3 install flask"
3. Run the following command line: "flask run"
@mhucka
mhucka / gist:a5d3eeb07c6e3fb679d1c01761f8f8fe
Created April 13, 2023 00:28
My conventional commits tags
build: Changes that affect the build system or external dependencies
ci: Changes to CI configuration files and scripts
docs: Documentation only changes
feat: A new feature
fix: A bug fix
perf: A code change that improves performance
refact: A code change that neither fixes a bug nor adds a feature
style: Changes that do not affect the meaning of the code
test: Adding missing tests or correcting existing tests
/*
* File name : Library/KeyBindings/DefaultKeyBinding.dict
* Description : MacOSX global key binding personalizations
* Original author(s): Michael Hucka <[email protected]>
* Organization : California Institute of Technology
*
* Some bindings were collected from TextServices.
* Original (for emacs bindings) came off the net somewhere.
*
* See here for more documentation:
@mhucka
mhucka / example-of-cirq-cirq-rigetti-import-error-2025-04-13.ipynb
Created April 13, 2025 18:13
Example of Cirq + cirq-rigetti import error 2025-04-13
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mhucka
mhucka / example-of-revised-installation-procedure-for-cirq-cirq-rigetti.ipynb
Created April 13, 2025 19:38
Example of revised installation procedure for Cirq + cirq-rigetti.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.