Skip to content

Instantly share code, notes, and snippets.

View loganwoolf's full-sized avatar

Logan Woolf loganwoolf

View GitHub Profile
@loganwoolf
loganwoolf / index.js
Created February 6, 2025 21:54
Node read/write stream
const fs = require('fs');
const readline = require('readline');
const inputFilePath = process.argv[2]; // Change this to your desired input CSV file path
const outputFilePath = process.argv[3]; // Change this to your desired output CSV file path
const readInterface = readline.createInterface({
input: fs.createReadStream(inputFilePath),
output: fs.createWriteStream(outputFilePath),
console: false,
@loganwoolf
loganwoolf / index.html
Created November 10, 2023 02:21
Browser Native ESModules
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta
http-equiv="X-UA-Compatible"
content="IE=edge"
>
<meta
@loganwoolf
loganwoolf / README.md
Last active May 10, 2024 18:02
Teamwork Customizations

Teamwork View Customization

Ever wish you could skip past all the timers in Teamwork tasks? Want to jump quickly to the top of the page when reviewing comments without losing your place? Wouldn't it be nice if teamwork was usable in a smaller window? Wish the active timer wasn't always in the way? You've come to the right place.

Here are some instructions for quickly and easily customizing Teamwork using a Chrome extension and some custom CSS and JS.

Features

  • The buttons at the top of the screen now wrap when the screen gets smaller.
  • The logged timers table section
@loganwoolf
loganwoolf / getTeamworkTasks.js
Created March 23, 2023 17:35
Scrape tasks from teamwork and display in console
const tasks = document.querySelectorAll('.w-task-row__name');
let outputString = ''
tasks.forEach(
(task) => outputString += `
${task.innerText}`
);
console.log(outputString);
@loganwoolf
loganwoolf / json.json
Last active February 24, 2023 15:45
BC Widget Code Snippets
{
// Place your snippets for json here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
// same ids are connected.
// Example:
// "Print to console": {
// "prefix": "log",
// "body": [
// "console.log('$1');",
@loganwoolf
loganwoolf / return-question.js
Last active December 31, 2021 06:52
Closure return value question
'use strict'
// reference
// https://www.telerik.com/amp/demystifying-closures-javascript/WEx1ZE1sRUVUWkE5S0dNbEhBNXJyUkU3T1Q4PQ2
const outer = ( () => {
let privateValue = ''
function setVar (str) {
privateValue = str