Skip to content

Instantly share code, notes, and snippets.

@estasney
estasney / macro
Created September 30, 2019 16:45
Copy from Excel to Word
Sub Macro1()
'
' Macro1 Macro
'
' Keyboard Shortcut: Ctrl+w
'
Dim objWord As Word.Application
Dim wordDoc As Word.Document
Application.ScreenUpdating = False
@estasney
estasney / index.html
Created November 25, 2019 17:03
D3 Collapsible Tidy Tree (v5)
<html>
</<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title></title>
<script src="https://d3js.org/d3.v5.js"></script>
<script type="text/javascript" src="d3-hierarchy.js"></script>
<style>
.link {
@estasney
estasney / README.md
Created December 6, 2019 14:17 — forked from robschmuecker/README.md
D3.js Drag and Drop, Zoomable, Panning, Collapsible Tree with auto-sizing.

This example pulls together various examples of work with trees in D3.js.

The panning functionality can certainly be improved in my opinion and I would be thrilled to see better solutions contributed.

One can do all manner of housekeeping or server related calls on the drop event to manage a remote tree dataset for example.

Dragging can be performed on any node other than root (flare). Dropping can be done on any node.

Panning can either be done by dragging an empty part of the SVG around or dragging a node towards an edge.

from sqlalchemy import create_engine
from collections import namedtuple
import re
from tqdm.auto import tqdm
Tag = namedtuple('Tag', 'id name count regex')
USERNAME = ''
PASSWORD = ''
URL = 'localhost'
@estasney
estasney / Runner.ahk
Created April 20, 2021 15:03
AutoHotKey Script Runner
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
#SingleInstance Force
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
# Change to folder with .bat scripts
SetWorkingDir C:\path\to\folder
#
FileListMsg :=""
@estasney
estasney / index.html
Last active December 13, 2021 21:51
JSON Tidy Tree
<!doctype html><html><head><meta charset="utf-8"><title>Tidy Tree</title><meta name="viewport" content="width=device-width,initial-scale=1"><script defer="defer" src="tidyTree.1b0427f078801b34e4e5.js"></script></head><body></body></html>
@estasney
estasney / ButtonRunner.ahk
Created October 1, 2021 17:23
GUI Script Runner
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#Warn ; Enable warnings to assist with detecting common errors.
#SingleInstance Force
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir C:\path\to\scripts\folder
padX := 10 ; X Padding Between Buttons
padY := 10 ; Y Padding Between Buttons
nCols := 3 ; Number of Columns
btnWidth := 150 ; Width of Buttons
This file has been truncated, but you can view the full file.
(()=>{"use strict";var __webpack_modules__={922:module=>{eval('\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\n\nmodule.exports = function (cssWithMappingToString) {\n var list = []; // return the list of modules as css string\n\n list.toString = function toString() {\n return this.map(function (item) {\n var content = "";\n var needLayer = typeof item[5] !== "undefined";\n\n if (item[4]) {\n content += "@supports (".concat(item[4], ") {");\n }\n\n if (item[2]) {\n content += "@media ".concat(item[2], " {");\n }\n\n if (needLayer) {\n content += "@layer".concat(item[5].length > 0 ? " ".concat(item[5]) : "", " {");\n }\n\n content += cssWithMappingToString(item);\n\n if (needLayer) {\n content += "}";\n }\n\n if (item[2]) {\n content += "}";\n }\n\n if (item[4]) {\n content += "}";\n }\n\n return content;\n }).join("");\n
@estasney
estasney / profiler.py
Created September 7, 2022 21:16
Line Profiler Decorator
import atexit
_PROFILER = None
def get_stats():
global _PROFILER
if _PROFILER is None:
print("No Profiler")
return
@estasney
estasney / variables.groovy
Created December 24, 2023 04:47
JetBrains Live Templates GroovyScript
// Split a comma sep string into an array
groovyScript("def result=_1.split(',').collect { '\"' + it.trim() + '\"' }.findAll { it != '\"\"' }.join(', ');return '[' + result+ ']';", SELECTION)