Skip to content

Instantly share code, notes, and snippets.

View kopelli's full-sized avatar

Steven Evans kopelli

  • Stoughton, WI
View GitHub Profile
@kopelli
kopelli / toast.ps1
Created September 28, 2021 13:41
Windows Native Notifications via Powershell
[Windows.UI.Notifications.ToastNotificationManager, Windows.UI.Notifications, ContentType = WindowsRuntime] | Out-Null
[Windows.UI.Notifications.ToastNotification, Windows.UI.Notifications, ContentType = WindowsRuntime] | Out-Null
[Windows.Data.Xml.Dom.XmlDocument, Windows.Data.Xml.Dom.XmlDocument, ContentType = WindowsRuntime] | Out-Null
$APP_ID = 'some_app_name'
$template = @"
<toast activationType="protocol" launch="https://google.com" duration="long">
<visual>
<binding template="ToastGeneric">
@kopelli
kopelli / .block
Last active September 28, 2021 17:50 — forked from d3noob/.block
Sankey diagram using a csv file with v4
license: mit
@kopelli
kopelli / Makefile
Last active June 23, 2023 19:34
Makefile with a "help" function"
.DEFAULT_GOAL := help
.PHONY += help
.SUFFIXES:
MAKEFLAGS += --no-builtin-rules
SHELL=/usr/bin/env bash
FORCE_BUILD:
help:
@echo "Targets:"

Keybase proof

I hereby claim:

  • I am kopelli on github.
  • I am kopelli (https://keybase.io/kopelli) on keybase.
  • I have a public key ASBnVoamGjJujUPPUraWT8fPJH8B4Mt8r0naH6FopjbGogo

To claim this, I am signing this object:

@kopelli
kopelli / README.md
Last active July 31, 2017 20:33 — forked from gmamaladze/README.md
Nodes snapping to colored clusters - d3.js sample

Drag gray nodes into one of the colored clusters. They will snap to the group. You can also move nodes out of groups to regroup them.

Created using D3's force layout. Forekd from Multi-Foci Force Layout.

This code is distributed under MIT license. Copyright (c) 2013 George Mamaladze. See MIT license.

@kopelli
kopelli / sync-file-times-with-git.sh
Created March 8, 2017 20:15
Run a couple commands to sync the file times (Creation/Modified/Access) times with their values from the Git repo.
if [[ "$OSTYPE" == "msys" ]]; then time git ls-tree -r -t --full-name --name-only "HEAD" | while read f ; do CREATE_TIME=$(git log --diff-filter=A --pretty=format:%cI -- "$f"); COMMAND="& { Get-Item \"./$f\" | Set-ItemProperty -Name CreationTime -Value '$CREATE_TIME' -ErrorAction SilentlyContinue -ErrorVariable ignoreError }" ; powershell -Command "$COMMAND" ; done ; fi
time git ls-tree -r -t --full-name --name-only "HEAD" | while read f ; do touch -d $(git log --pretty=format:%cI -1 "HEAD" -- "$f") "./$f"; done
@kopelli
kopelli / index.js
Created February 20, 2017 19:07
Show/Select a file in Explorer via NodeJS
var file = 'C:\Windows\System32\notepad.exe';
require('child_process').exec('explorer /e,/select,"' + file + '"');
@kopelli
kopelli / file.bat
Last active August 2, 2017 19:05
Comprehensive Batch File Template
:<<"::SHELLSCRIPT"
@GOTO :CMDSCRIPT
::SHELLSCRIPT
echo "Welcome to the bash side of this script
exit $?
:CMDSCRIPT
@ECHO Welcome to the %COMSPEC% side of this script
START http://boxstarter.org/package/nr/url?https://gist.githubusercontent.com/kopelli/920b09107aec406ce251/raw/adb3293cf68648dd31df0b36f15064fee7eaef19/BoxStarter
@kopelli
kopelli / KeyboardLens.ahk
Created September 20, 2012 12:12
AutoHotKey script for showing the last 10 key combinations entered on the keyboard
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
;#Warn ; Recommended for catching common errors.
;; Common conventions used in this file:
;; variables prefixed with g_ are ment to be global variables
;; variables prefixed with l_ are ment to be local to the method, label
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.