Skip to content

Instantly share code, notes, and snippets.

@kujhawk94
kujhawk94 / focoical.ics
Last active January 26, 2025 08:09
FoCo weather calendar
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//NOAA Weather iCal Generator//EN
BEGIN:VEVENT
SUMMARY:↑27↓7💨2-5☔️43
DTSTART;VALUE=DATE:20250126
DTEND;VALUE=DATE:20250126
DESCRIPTION:Day: A slight chance of snow before 7am. Partly sunny. High near 28, with temperatures falling to around 22 in the afternoon. Wind chill values as low as 0. East northeast wind around 3 mph. Chance of precipitation is 20%.\nNight: Mostly clear. Low around 8, with temperatures rising to around 10 overnight. West wind around 5 mph.
END:VEVENT
BEGIN:VEVENT
@kujhawk94
kujhawk94 / darken.md
Created April 25, 2024 14:47 — forked from caseywatts/darken.md
Darkening PDFs

short url to these instructions: caseywatts.com/darken

Other gists & tricks: http://caseywatts.com/gists-and-tricks

Using Monochrome (recommended)

  • obtain your ugly, gray pdf
  • brew install imagemagick
  • brew install ghostscript
  • magic command!
@kujhawk94
kujhawk94 / script-template.sh
Created January 3, 2024 22:37 — forked from m-radzikowski/script-template.sh
Minimal safe Bash script template - see the article with full description: https://betterdev.blog/minimal-safe-bash-script-template/
#!/usr/bin/env bash
set -Eeuo pipefail
trap cleanup SIGINT SIGTERM ERR EXIT
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
usage() {
cat <<EOF
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...]
@kujhawk94
kujhawk94 / unsign-note-01.sql
Last active June 22, 2023 18:14
Unsign document in eMDs when it has a TrackChart_ID
-- unsign-note-01.sql
-- 2023-06-22
-- Use right-click Help menu to find the TrackChart_ID and insert below
-- --
UPDATE
[dbo].[TRK_TrackChart]
SET
[TrackChart_DocStatus] = '1',
[TrackChart_SignedOff] = '0'
WHERE
@kujhawk94
kujhawk94 / dcsl
Created June 14, 2023 18:05 — forked from sheershoff/dcsl
Docker-compose logs sorted by time
#!/bin/bash
usage="Input piped docker-compose logs -t, or a file created from this command, to show logs lines sorted by time.\n\n Usage:\n\n $(basename "$0") [-h|--help] - this message\n $(basename "$0") - runs default docker-compose logs -t and sorts'em\n docker-compose logs -t|$(basename "$0") - pipe logs to this command\n $(basename "$0") my-compose.log - or choose file with logs to display\n\n"
[ $# -ge 1 -a -f "$1" ] && input="$1" || input="-"
case "$1" in
-h|--help) printf "$usage"
exit
;;
esac
if [ -t 0 ]; then
docker-compose logs -t|sort -t "|" -k +2d
@kujhawk94
kujhawk94 / gist:8f4b4f9facc1b70553e152384283a483
Created February 22, 2021 00:55
Empty start menu template
<LayoutModificationTemplate xmlns:defaultlayout="http://schemas.microsoft.com/Start/2014/FullDefaultLayout" xmlns:start="http://schemas.microsoft.com/Start/2014/StartLayout" Version="1" xmlns="http://schemas.microsoft.com/Start/2014/LayoutModification">
<LayoutOptions StartTileGroupCellWidth="6" />
<DefaultLayoutOverride LayoutCustomizationRestrictionType="OnlySpecifiedGroups">
<StartLayoutCollection>
<defaultlayout:StartLayout GroupCellWidth="6">
<start:Group Name="Apps">
<start:DesktopApplicationTile Size="1x1" Column="0" Row="0" DesktopApplicationLinkPath="%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\Google Chrome.lnk" />
</start:Group>
<start:Group Name="System">
<start:DesktopApplicationTile Size="1x1" Column="0" Row="0" DesktopApplicationLinkPath="%APPDATA%\Microsoft\Windows\Start Menu\Programs\System Tools\computer.lnk" />

Keybase proof

I hereby claim:

  • I am kujhawk94 on github.
  • I am kujhawk94 (https://keybase.io/kujhawk94) on keybase.
  • I have a public key whose fingerprint is 5058 E5B6 FF3F 0FEE 7A17 CE1A DAAB 577A 40F4 72C4

To claim this, I am signing this object:

@kujhawk94
kujhawk94 / connection-test.pl
Created May 25, 2016 16:50
Perl script which connects to Active Directory server and prints list of accounts and password set dates
#!/usr/bin/perl
use Net::LDAP;
use Data::Dumper;
my $LDAPSERVER = '192.168.1.2';
my $ADUSERNAME = '[email protected]';
my $ADPASSWORD = '********';
my $LDAPBASE = 'CN=Users,DC=domain,DC=local';
@kujhawk94
kujhawk94 / listTopsDataUsers.sql
Last active May 14, 2016 20:53
Get a list of users connected to e-MDs TopsData application
SELECT DISTINCT
loginame [Login],
hostname,
sd.name DBName,
[program_name] ProgramName
FROM master.dbo.sysprocesses sp
JOIN master.dbo.sysdatabases sd ON sp.dbid = sd.dbid
WHERE sd.name = 'TopsData'
AND program_name = 'e-MDs Solution Series'
ORDER BY loginame
@kujhawk94
kujhawk94 / Find insurance information by patient id
Created October 23, 2013 15:30
e-mds query to find the insurance associated with a specified patient id
SELECT
pat.patient_ID AS PID,
i.insurance_sequence as RN,
ic.InsuranceCompany_ID AS ID,
o.organization_name AS Ins_name,
ic.entity_ID
FROM
TopsData.dbo.enty_patient pat
LEFT JOIN TopsData.dbo.insr_insurance i on
(