I am mainly following
AsgerPetersen's gist and MS's visualstudio python-tutorial and qgis developer_cookbook
-
install this extension pack
-
install ptvsd using the QGIS python3 bin:
cd /Applications/QGIS.app/Contents/MacOS/bin| // ripped/forked from: | |
| // https://raw.githubusercontent.com/TechToThePeople/node-civicrm/c0056935e9309865dad1ec533f0473f61395d0a3/civicrm.js | |
| import request from 'npm:request'; | |
| import qs from 'npm:qs'; | |
| import _ from 'npm:underscore'; | |
| import async from 'npm:async'; | |
| var p:any // needed to fork the whole stupid v3 js sdk so i could add this line |
| { pkgs, lib, ... }: { | |
| # from https://gist.github.com/hermannolafs/c1379a090350d2dc369aeabd3c0d8de3 | |
| # minimized for clarity. | |
| # Some of these might not be needed. After some trial and error | |
| # I got this working with these configs. | |
| # I do not have the patience to rn an elimination test. | |
| services.gnome.gnome-remote-desktop.enable = true; |
| right_format = """ | |
| [](fg:tooling_hex bg:none)\ | |
| $c\ | |
| $elixir\ | |
| $elm\ | |
| $golang\ | |
| $gradle\ | |
| $haskell\ | |
| $java\ | |
| $julia\ |
I am mainly following
AsgerPetersen's gist and MS's visualstudio python-tutorial and qgis developer_cookbook
install this extension pack
install ptvsd using the QGIS python3 bin:
cd /Applications/QGIS.app/Contents/MacOS/bin| "convert for of loop topline to use index" : { | |
| "prefix": "fc", | |
| "body": ["${TM_SELECTED_TEXT/(for \\(const )(.*) of (.*)\\) {/$1[idx, $2] of $3.entries()) {/}"], | |
| "description": "to use this snippet, select the top line of your for loop, type fc on top of it, choose snippet" | |
| }, |
| const sendToDiscord = async (channelHookURL, content) => { | |
| // https://discord.com/developers/docs/resources/webhook#execute-webhook | |
| let httpResponse; let status = 'success' | |
| try { | |
| httpResponse = await Moralis.Cloud.httpRequest({ | |
| method: 'POST', | |
| url: channelHookURL, | |
| body: { | |
| flags: 1 << 2, // not working attempt to prevent links from embedding | |
| content, |
| Moralis.Cloud.beforeConsume('Shipped', (event) => { | |
| if (!event.confirmed) return false | |
| delete event.address | |
| delete event.confirmed | |
| delete event.block_hash | |
| log(`beforeConsume - ${event}`) | |
| return true | |
| }) | |
| Moralis.Cloud.afterSave('Shipped', async (request) => { |
| #!/bin/bash | |
| #source profile with GO path etc | |
| . /etc/profile.d/regen.sh | |
| x=1 | |
| limit=${1:-100} | |
| while [ $x -le $limit ] | |
| do | |
| UPSTREAM_BLOCKS=$(curl -s http://161.35.51.84:26657/consensus_state | jq -r '.result.round_state."height/round/step"' | cut -d'/' -f1) |
| #!/bin/bash | |
| START_HEIGHT=${1:-41500} | |
| END_HEIGHT=${2:-43200} | |
| NODE="--node http://${3:-161.35.51.84}:26657" | |
| LOOP_RANGE=$(eval echo {$START_HEIGHT..$END_HEIGHT}) | |
| RUNNING_MEMOS=() | |
| for BLOCK_HEIGHT in $LOOP_RANGE; do |
| #!/bin/bash | |
| BLOCK_HEIGHT=${1:-42672} # the block with most txs during the stress test | |
| eachPage=1 | |
| # escaping syntax from https://pkg.go.dev/github.com/qredo/tendermint/rpc/core#TxSearch | |
| CMD="regen query txs --events 'tx.height=${BLOCK_HEIGHT}' --limit 100 --page=${eachPage}" | |
| echo 'First Page:' | |
| echo "$CMD | jq ." | |
| RESULT=$(eval $CMD) |