Skip to content

Instantly share code, notes, and snippets.

@xverges
xverges / bifocals.user.js
Created March 6, 2023 08:32
tampermonkey userscript for richer tooltips in bifocals
// ==UserScript==
// @name Display Jira titles in bifocals
// @namespace https://github.com/xverges
// @version 0.1
// @description Richer tooltips on bifocals tickets
// @author https://github.com/xverges
// @match https://bifocals.streamsets.net/products/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=streamsets.net
// @grant GM_xmlhttpRequest
// @run-at document-idle
@xverges
xverges / README.md
Last active November 16, 2022 09:09
cleanup fixture
$ python -m pytest -rP test1.py
================================== test session starts ==================================
platform darwin -- Python 3.8.13, pytest-7.2.0, pluggy-1.0.0
rootdir: /Users/xavier/src/streamsets/stf-4.x, configfile: pytest.ini
collected 2 items

test1.py::test_with_s3_buckets PASSED                                             [ 50%]
test1.py::test_with_bad_resource SKIPPED (unconditional skip)                     [100%]

Place these files in ~/.oh-my-zsh/custom. They are processed alphabetically, so thus the naming.

  • The first one has the aliases that I have found in onboarding documentation.
  • The second one, aliases that I missed. I have prefixed some of them with _ch for control hub stuff, and with _dc for data collector stuff.
  • The third one uses alias from the previous two files so that I can take advantage of tab completion to remember what commands are available.

With that in place, ch- + tab and you should mbe able to see what you need to run next. 🤞 image

#!/bin/zsh
set -euo pipefail
me=$(basename "$0")
if [ $# -ne 2 ]; then
echo "USAGE: ${me} <input> <speed_increment>"
# TODO: print usage
exit 1
@xverges
xverges / xv.consoles.tools.sh
Created September 12, 2021 18:24
Start my tiddlywiki+other tools
#!/bin/bash
# Bash "strict mode", to help catch problems and bugs in the shell
# script. Every bash script you write should include this. See
# http://redsymbol.net/articles/unofficial-bash-strict-mode/ for
# details.
set -euo pipefail
# This works:
# clear; echo Press a key to start, ^C to break; read -rsn 1; echo LONG TASK
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>AlternateMouseScroll</key>
<true/>
<key>AppleAntiAliasingThreshold</key>
<integer>1</integer>
<key>ApplePressAndHoldEnabled</key>
<false/>
@xverges
xverges / consoles.biomage.sh
Last active May 4, 2021 06:36
Start my Biomage development environment
#!/bin/zsh
# Bash "strict mode", to help catch problems and bugs in the shell
# script. Every bash script you write should include this. See
# http://redsymbol.net/articles/unofficial-bash-strict-mode/ for
# details.
set -euo pipefail
MAIN="$(dirname "${BIOMAGE_DATA_PATH}")"
@xverges
xverges / SimplifiedVerticalAreaPlot.json
Last active April 7, 2021 16:54
Vega Vertical Violin Plot
{
"$schema": "https://vega.github.io/schema/vega/v5.json",
"description": "A violin plot example showing distributions for pengiun body mass.",
"height": 400,
"padding": 5,
"config": {
"axisBand": {
"bandPosition": 1,
"tickExtra": true,
"tickOffset": 0
@xverges
xverges / keybase.md
Created May 26, 2015 22:02
keybase proof

Keybase proof

I hereby claim:

  • I am xverges on github.
  • I am xverges (https://keybase.io/xverges) on keybase.
  • I have a public key whose fingerprint is 5D57 8B06 50C8 739C 8244 D112 5D0E 592A DA64 23FE

To claim this, I am signing this object:

"use strict";
var fs = require('fs');
var path = require('path');
var _ = require('lodash');
var turf = require('turf');
var bcnByDistrict = fs.readFileSync(path.join(__dirname, 'barcelona-neighborhoods.geojson'));
var polygons = JSON.parse(bcnByDistrict);