Skip to content

Instantly share code, notes, and snippets.

@nicolevanderhoeven
nicolevanderhoeven / floodchrome-challenge.ts
Last active February 19, 2018 18:38
Flood Challenge - Flood Chrome script
import { step, TestSettings, Until, By, MouseButtons, Device, Driver } from '@flood/chrome'
import * as assert from 'assert'
export default () => {
step('Challenge Home', async browser => {
//Navigate to homepage.
await browser.visit('https://challenge.flood.io')
//Validate text
let validation = By.visibleText('Ready to take the test?')
@nicolevanderhoeven
nicolevanderhoeven / aqueduct_jmeter.jmx
Created February 22, 2019 12:39
JMeter - Using Flood Aqueduct
<?xml version="1.0" encoding="UTF-8"?>
<jmeterTestPlan version="1.2" properties="4.0" jmeter="4.0 r1823414">
<hashTree>
<TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan" enabled="true">
<stringProp name="TestPlan.comments"></stringProp>
<boolProp name="TestPlan.functional_mode">false</boolProp>
<boolProp name="TestPlan.tearDown_on_shutdown">true</boolProp>
<boolProp name="TestPlan.serialize_threadgroups">false</boolProp>
<elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
<collectionProp name="Arguments.arguments"/>

Keybase proof

I hereby claim:

  • I am nicolevanderhoeven on github.
  • I am nvanderhoeven (https://keybase.io/nvanderhoeven) on keybase.
  • I have a public key ASDy8GPGGxrvAKoYUQrY5nBVDbVURN-RPJV8po-lcbbwsgo

To claim this, I am signing this object:

@nicolevanderhoeven
nicolevanderhoeven / yinotetoroam.py
Created December 15, 2020 20:59
Reformat exported Markdown file from YiNote for importing into Roam Research
# Parses a .md generated by [YiNote](https://yinote.co/) and reformats it for export into [Roam Research](https://roamresearch.com).
# Prereq: Input .md file in the same folder
# Run this and pipe the output to a file you specify, i.e. `python3 yinotetoroam.py > output.md`
# Import `output.md` to Roam.
import re
import datetime
import glob
try:
filename = glob.glob('*.md')
@nicolevanderhoeven
nicolevanderhoeven / deroamify.py
Created December 18, 2020 22:16
Reformats Roam Markdown output for publishing via Hugo or similar
# Takes exported Roam input and turns it into a better format for publishing.
# Output is still Markdown, but it's one that doesn't support backlinks.
# Good for traditional blogs.
# Run from a directory with a source .md file.
# Pipe output to a new file, i.e., output.md
import re
import glob
try:
filename = glob.glob('*.md')

+++ title = "Load Tests as Code" outputs = ["Reveal"] [reveal_hugo] custom_theme = "reveal-hugo/themes/robot-lung.css" margin = 0.2 highlight_theme = "color-brewer" transition = "slide" transition_speed = "fast" +++

@nicolevanderhoeven
nicolevanderhoeven / home-login.js
Last active October 1, 2021 08:18
k6 sample load testing script with variable think time, multiple scenarios, thresholds, test data, and correlation of dynamic values.
import http from 'k6/http';
import { sleep, check } from 'k6';
import { parseHTML } from "k6/html";
import papaparse from 'https://jslib.k6.io/papaparse/5.1.1/index.js';
import { SharedArray } from "k6/data";
const domain = 'https://test.k6.io'; // Parameterize the domain to make it easier to change environments.
let token = 'NOT FOUND'; // Initialize the csrftoken variable.
/*
@nicolevanderhoeven
nicolevanderhoeven / downloadfirebase.py
Last active June 12, 2023 18:24
Download Roam images locally for use with Obsidian vault
# Opens files in directory, outputs firebase URLs to a file, downloads them, and replaces the links with a link to the new files.
# To use, replace PATH in the variable vaultDir with your vault's root directory.
# This automatically puts filenames in /assets - change the newFilePath variable if you want to change this
import re
import glob
import os
import requests
import calendar
import time
@nicolevanderhoeven
nicolevanderhoeven / returnStudyOptions.js
Created January 14, 2022 11:16
Script for use with the Obsidian Dataview and Templater plugins to return activity options given an amount of time available
/*
This script returns a list of activity options you could do (each defined by a Markdown file),
depending on how much time you have available.
REQUIRES:
- Obsidian: https://obsidian.md
- Obsidian Dataview plugin: https://blacksmithgu.github.io/obsidian-dataview/
- Obsidian Templater plugin: https://silentvoid13.github.io/Templater/
- this folder structure:
@nicolevanderhoeven
nicolevanderhoeven / daily.md
Last active November 9, 2022 14:18
Obsidian Daily Note template with a DataviewJS snippet for returning tasks due on a certain date

{{title}}

Tasks due today

dv.taskList(dv.pages().file.tasks 
  .where(t => !t.completed)
  .where(t => t.text.includes("{{date:YYYY-MM-DD}}")))