This file contains 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
# example action | |
action = { | |
"id": "", | |
"buy": {"amount": "", "currency": ""}, | |
"sell": {"amount": "", "currency": ""}, | |
"state": "", | |
} | |
# alternate implementation: Pydantic or dataclasses |
This file contains 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
"""Print out a shell command to start your favorite editor, | |
prepared with environment variables and in an aws-vault context. | |
Setup | |
put the editor.py and the .env file(s) somewhere outside of the repo folders. | |
Usage | |
Run the script with 3 parameters: | |
path to .env file | |
aws-vault profile |
This file contains 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
;; The shadow-cljs EDN configuration | |
{:source-paths | |
["src/main"] | |
:dependencies | |
[[reagent "1.1.0"] | |
[arttuka/reagent-material-ui "5.2.4-0"]] | |
:dev-http {8080 "public"} | |
This file contains 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
function log(...args) { | |
console.log(Date.now().toString(), ...args); | |
} | |
function processData() { | |
log('processing ...'); | |
for (let i = 0; i < 1000000; i += 1) { | |
JSON.parse('{"hello": "world"}'); | |
} |
This file contains 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
#!/bin/bash | |
(firefox -new-tab http://devdocs.io/lodash/index#"$1" &) |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>an example</title> | |
<!-- Google Analytics --> | |
<script> | |
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ | |
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), | |
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) | |
})(window,document,'script','//www.google-analytics.com/analytics.js','ga'); |