Skip to content

Instantly share code, notes, and snippets.

@n0nick
n0nick / adf-repro-app10891.sh
Created May 14, 2026 18:59
Minimal ADF repro — APP-10891
#!/usr/bin/env zsh
# Minimal repro for two ADF bugs (APP-10891)
# Requires: mongosh, az CLI, bsondump (optional, for verification)
STORAGE_ACCOUNT="sttabulardatadev1"
CONTAINER="sagie-test-app10891"
BLOB_PATH="f87b919c-63b2-4d32-b676-0b55393938d7/2574ics2q6/4406b6c3-ffd4-4f99-b01e-45e26a561ade/7f635c4d-b3f8-4cc7-8410-f119bb7b20b4/rdk:component:movement_sensor/etai/AngularVelocity/2025-04-16/data-1.bson"
ADF_URI="mongodb://data-federation-f87b919c-63b2-4d32-b676-0b55393938d7azure-byp8n.virginia-usa.z.query.mongodb.net/sensorData"
ADF_USER="viam-db-user"
#!/usr/bin/env zsh
set -euo pipefail
# Cleanup local and remote branches that have merged/closed PRs.
# Scans the current git repo, checks GitHub PR status via gh CLI,
# and prompts before deleting.
if ! git rev-parse --is-inside-work-tree &>/dev/null; then
echo "Not a git repository." >&2
exit 1
# Fresh install, no taps yet:
$ brew tap
# Failing with short names:
$ brew bundle -v --file=- <<-EOS
tap "viamrobotics/brews"
brew "canon"
EOS
Error: No available formula with the name "canon". Did you mean carton?
`brew bundle` failed! Failed to fetch canon
@n0nick
n0nick / index.ts
Last active December 18, 2017 23:31
class A {
private foo;
private bar;
func() {
console.log({
a: () => { console.log(this.foo); }, // this is fine
b() { console.log(this.bar); }, // here's the bug
});
}
@n0nick
n0nick / .prettierrc
Last active September 26, 2017 09:45
ale-example
{
"singleQuote": true,
}
@n0nick
n0nick / test.js
Created September 24, 2017 05:22
Adding gem paths to Webpacker config
// config/webpack/test.js
const environment = require('./environment');
const webpackConfigWithGems = require('./utils/webpack_config_with_gems');
module.exports = webpackConfigWithGems(environment);
@n0nick
n0nick / copy_gem_assets_plugin.js
Last active June 25, 2017 05:24
Webpack plugin for copying JS assets from Ruby gems (in a Webpacker/Rails project)
// config/webpack/plugins/copy_gem_assets_plugin.js
const copy = require('copy');
const path = require('path');
const { execSync } = require('child_process');
const { settings } = require('../configuration.js');
function CopyGemAssetsPlugin(options) {
this.gemsList = options.gems || [];
this.outPath = options.outPath || path.join('vendor', 'gems');
}
@n0nick
n0nick / kube-context.zsh
Created January 25, 2017 10:57
Kubernetes context selector (with ZSH completions)
# kubectl context switcher + completion
function kube-context() {
kubectl config use-context $@
}
_kube-context_completions() {
local -a options
options=()
for c in $(kubectl config view -o jsonpath='{.contexts[*].name}'); do
d=$(echo $c | awk 'BEGIN { FS="_" }; { printf "%11s: %-15s %-14s", $4, $3, $2 }')

Keybase proof

I hereby claim:

  • I am n0nick on github.
  • I am n0nick (https://keybase.io/n0nick) on keybase.
  • I have a public key whose fingerprint is F978 9870 5D9C 85EE B809 30B6 14BE 250B 5830 BDFB

To claim this, I am signing this object:

Image: /Users/sagie/Downloads/53f770fc-4ce1-11e5-9afe-a822d4863969.png
Format: PNG (Portable Network Graphics)
Mime type: image/png
Class: DirectClass
Geometry: 200x200+0+0
Units: Undefined
Type: TrueColor
Endianess: Undefined
Colorspace: sRGB
Depth: 8-bit