Skip to content

Instantly share code, notes, and snippets.

@dym-ok
dym-ok / debug.md
Created November 1, 2023 14:59
debugging faulty Python code

You can either launch interpreter in debug mode like this: python3 -q -X faulthandler or use in code

import faulthandler

faulthandler.enable()
// bad code goes here

to catch sources of IllegalInstruction and other similar errors.

@dym-ok
dym-ok / git_install.sh
Created September 1, 2023 12:46
install a package from private git repo with custom SSH key
GIT_SSH_COMMAND="ssh -i ~/.ssh/my-deploy-key" \
pip install git+ssh://git@github.com/echweb/echweb-utils.git
@dym-ok
dym-ok / conda_register.sh
Created May 2, 2023 20:15
Registers conda hook in Bash
$(conda shell.bash hook)
@dym-ok
dym-ok / globals.yaml
Last active August 17, 2020 17:32
Enable X-Ray tracing with AWS SAM
Globals:
Function:
Tracing: Active
Api:
TracingEnabled: True
@dym-ok
dym-ok / convert.sh
Created April 14, 2020 13:50
Convert SAM template to CloudFormation template
sam validate -t sam.yaml --debug 2>&1 | \
awk '/Translated template is:/,/is a valid SAM Template/' | \
tail -n +2 | \
fgrep -v 'is a valid SAM Template' > output-template.yaml
@dym-ok
dym-ok / stuff.sh
Created March 17, 2020 08:56
Docker on mac commands
# connect to VM tty
screen -O ~/Library/Containers/com.docker.docker/Data/vms/0/tty

Keybase proof

I hereby claim:

  • I am dym-ok on github.
  • I am 1inuxoid (https://keybase.io/1inuxoid) on keybase.
  • I have a public key ASAcJBbEJm5bTInrCXbAeAUBDj01pj3dqrm234nfgg0B8wo

To claim this, I am signing this object: