Skip to content

Instantly share code, notes, and snippets.

@lundeen-bryan
lundeen-bryan / curl.cmd
Created September 15, 2020 02:57 — forked from gmarik/curl.cmd
@rem Do not use "echo off" to not affect any child calls.
@setlocal
@rem Get the abolute path to the parent directory, which is assumed to be the
@rem Git installation root.
@for /F "delims=" %%I in ("%~dp0..") do @set git_install_root=%%~fI
@set PATH=%git_install_root%\bin;%git_install_root%\mingw\bin;%PATH%
@if not exist "%HOME%" @set HOME=%HOMEDRIVE%%HOMEPATH%
@if not exist "%HOME%" @set HOME=%USERPROFILE%
@lundeen-bryan
lundeen-bryan / fnc_CopyToClipRunCmd.bas
Last active February 4, 2023 18:53
Use win clipboard in VBA
Attribute VB_Name = "fnc_CopyToClipRunCmd"
' namespace=\
' filename=fnc_CopyToClipRunCmd.bas
Option Explicit
'' ! This WinAPI solution doesn't work see notes at EOF
Private Declare PtrSafe Function OpenClipboard Lib "user32.dll" (ByVal hWnd As LongPtr) As LongPtr
Private Declare PtrSafe Function EmptyClipboard Lib "user32.dll" () As LongPtr
Private Declare PtrSafe Function CloseClipboard Lib "user32.dll" () As LongPtr
Private Declare PtrSafe Function IsClipboardFormatAvailable Lib "user32.dll" (ByVal wFormat As LongPtr) As LongPtr
@lundeen-bryan
lundeen-bryan / ClsidWin10.md
Last active April 19, 2024 05:35
All CLSIDs in Win10

All CLSIDs for Windows 10

About This File

This md file stored in gist is a list of all CLSIDs for Windows10 that I could find. It's a growing list.

When you want to run this in Run menu Win+r and typs Shell:::{[the clsid number here]}

Last Updated

@lundeen-bryan
lundeen-bryan / EnvironmentVariables.md
Last active February 15, 2022 03:46
EnvironVariables
Environment Variables Values (may vary)
%ALLUSERSPROFILE% C:\ProgramData
%APPDATA% C:\Users(user-name)\AppData\Roaming
%CD% (command prompt only) Current directory full path
%CMDCMDLINE% (comma
@lundeen-bryan
lundeen-bryan / TableInWord.bas
Last active February 20, 2022 17:12
TableInWord
Attribute VB_Name = "mod_TableInWord"
''===========================================================================================
'' Procedure: ......... TableInWord.bas/SizeTable
'' Description: ....... Create table if none, size all tables based on user input
'' Module URL: ........ https://gist.github.com/lundeen-bryan/3bcd197d287e1cc08957dd0c52337d50
'' Version: ........... 1.0.0 - major.minor.patch
'' Created: ........... 2022-02-20
'' Updated: ........... 2022-02-20
'' Compatibility: ..... Word
'' Install: ........... Save this as ".bas" file or copy and paste text to a module in vba IDE
Attribute VB_Name = "fnc_ReturnMyDocsPath"
' namespace=vba-files/Modules
' filename=fnc_ReturnMyDocsPath.bas
Option Explicit
Const sep As String = "\"
Public Function ReturnMyDocsPath_fnc() As String
@lundeen-bryan
lundeen-bryan / sql_cheatsheet.md
Last active May 5, 2022 02:17
SQL_Cheatsheet
Key CMD HINT
S SELECT SWEATY
F FROM FEET
W WHERE WILL
G GROUP BY GIVE
H HAVING HORRIBLE
O ORDER ODOR
@lundeen-bryan
lundeen-bryan / SQL_Pivot_Table_Walkthrough.sql
Last active May 5, 2022 19:15
SQL Pivot Table example and walkthrough
/*
Filename: ...: SQL_Pivot_Table_Walkthrough.sql
Date ........: 05-May-2022
Time ........: 08:11
Desc ........: Shows how to make a pivot tbl in SQL
Notes........:
1. See MSDN documentation for PIVOT at https://archive.ph/wip/VK8aD
2. Most code modified from Travis Cuzick's SQL course on Udemy
*/
USE [AdventureWorks2019]
@lundeen-bryan
lundeen-bryan / VsCode_Keybindings.json
Last active September 21, 2023 19:30
vs code keybindings
// Place your key bindings in this file to override the defaultsauto
[
{
"key": "ctrl+shift+u",
"command": "workbench.action.output.toggleOutput",
"when": "workbench.panel.output.active"
},
{
"key": "ctrl+k tab",
"command": "type",
@lundeen-bryan
lundeen-bryan / sql.json
Last active May 15, 2022 17:07
SQLsnippet
{
"Tips":{
"prefix": "b'sqltips",
"body": [
"--Sweaty(SELECT) Feet(FROM) Will(WHERE) Give(GROUP BY) Horrible(HAVING) Oder(ORDER BY)",
"--SELECT",
"--FROM",
"--WHERE",
"--GROUP BY",
"--HAVING",