This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; | |
;; 28.07.2017 | |
;; Charles Wang | |
;; | |
;;;;;;; Tweaks for Org & org-latex ;;;;;; | |
(defvar cw/org-last-fragment nil | |
"Holds the type and position of last valid fragment we were on. Format: (FRAGMENT_TYPE FRAGMENT_POINT_BEGIN)" | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
help() { | |
cat <<EOF | |
Options: | |
- cc-disable | |
Disable charging control | |
- cc-home | |
Charging control to Home mode (40%-70%) | |
- cc-work |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# -- An improved version of this code is now in the aioresult library -- | |
# | |
# https://github.com/arthur-tacca/aioresult | |
# | |
# | |
# - aioresult has a ResultCapture class similar to the one below | |
# - It also has a Future class that allows manually setting the result, which shares a base class with ResultCapture | |
# - There is a utility function with a similar effect to StartableResultCapture below (but much simpler) | |
# - There are utility functions wait_any(), wait_all() and to_channel() (which also work with Future instances) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Quick snippet to connect to a Jupyter notebook server running inside a Modal container, | |
# especially useful for exploring the contents of Modal shared volumes. | |
# This uses https://github.com/ekzhang/bore to expose the server to the public internet. | |
# | |
# Steps | |
# ----- | |
# 1. (Recommended) Change `JUPYTER_TOKEN` to a different value; default is 1234. | |
# 2. `modal run jupyter-bore.py` | |
# 3. Find the `bore.pub` URL printed in the logs, and navigate to it using your browser. |
OlderNewer