Code¶
This directory houses various code snippets, scripts, and tips/tricks for a variety of my most commonly used Programming Languages
Contents¶
- Cascading Style Sheets (CSS)
- GitHub Actions
- JavaScript
- Linux
- Bash
- WSL
- Pandoc
- PowerShell (Core)
- Python
- R
- Structured Query Language (SQL)
- BigQuery
- PostgreSQL
- Microsoft SQL Server (MSSQL / T-SQL)
- Windows
- Batch Scripts
- Miscellaneous
- Registry (RegEdit)
- Run Commands
- Visual Basic
- Windows Command Line (CMD/MS-DOS)
- Windows PowerShell
- MindMap
- Appendix: Links
Cascading Style Sheets (CSS)¶
- CSS - CSS Code Snippets.
- CSS - Default Obsidian Theme Styling
- CSS - GitHub Obsidian Theme
GitHub Actions¶
- GitHub Actions - GitHub Action Code Snippets.
- GHA - R Build-Check-Install: Build, Check, and Install R Package
- GHA - R Code Coverage: Run Code Coverage on an R Package
- GHA - Git-Cliff: automate the generation of
CHANGELOG.md
‘s using Git-Cliff. - GHA - R pkgdown: Generate and deploy a dedicated pkgdown Documentation Website
- GHA - R Package Validation: Perform R Package Validations
- GHA - R Spelling: Run
spelling::spellcheck()
on your R Package - GHA - Release: Create a new GitHub Release
- GHA - R roxygen: Document your R package via roxygen2
- GHA - GitHub Actions for R: List of various R Github Actions
JavaScript¶
- Javascript Code - Javascript Code Snippets.
- JS - Remove all YouTube Watch Later Videos
- JS - Obsidian Web Clipper Bookmarklet
Linux¶
Bash¶
- Bash - Linux Bash Code Snippets.
- Bash - Git-Auto
- Bash - Install NVM
- Bash - Install oh-my-zsh
- Bash - GitHub Downloader
WSL¶
- WSL - Code Snippets and Scripts Specific to Windows Subsystem for Linux (WSL)
- Bash - Install WSLU
Pandoc¶
PowerShell (Core)¶
- PowerShell - PowerShell Code Snippets.
- 2-Areas/Code/PowerShell/PowerShell - Cleanup Windows Script: Cleanup and Debloat Windows
- 2-Areas/Code/PowerShell/PowerShell - Custom Installation Helpers: Some of my custom installation helper functions
- 2-Areas/Code/PowerShell/PowerShell - Edge Scripts: Edge related functions
- 2-Areas/Code/PowerShell/PowerShell - Git AutoCommit: Autocommit with Git
- PowerShell - Install AWS CLI: Install AWS CLI using 3-Resources/Tools/Developer Tools/Languages/PowerShell
- 2-Areas/Code/PowerShell/PowerShell - Install Azure-CLI: Install Azure CLI using 3-Resources/Tools/Developer Tools/Languages/PowerShell
- PowerShell - Install Backblaze Client: Install the Backblaze Client
- PowerShell - Install Chocolatey: Install Chocolatey Package Manager
- PowerShell - Map Drives Function: Map Drives
- PowerShell - Open Obsidian Vault: Launch an Obsidian Vault using the Obsidian URI
- PowerShell - QuickAccess Utilities: QAT utilities
- PowerShell - Retrieve Local Public IPv4 IP Address: Retrieve your IPv4 IP Address
- PowerShell - Scoop Import: Custom Scoop Import
- PowerShell - System PATH Helpers: Helper functions for working with your system
%PATH%
environment variables - PowerShell - Toast Notification Example: Toast notifications
- PowerShell - Useful Profile Utility Functions: Miscellaneous utility functions
Python¶
- Python - Python Code Snippets.
- Python - Upgrade PIP: Upgrade pip
R¶
- R - R Code Snippets.
- R - docker_shiny_mssql
- R - mssql_rstudio
- R - Handle long polling process in Plumber or Shiny
- R - Excel Helpers
- R - Package Management Scripts
- R - Retrieve GitHub Starred Repo Data
- R - Run Shiny App in Background for Development
- R - Simulate Actuarial Claims Data - Simulation R Script
- R - Upgrade R and Migrate Packages
Structured Query Language (SQL)¶
BigQuery¶
#Status/WIP
- BigQuery
PostgreSQL¶
- SQL/PostgreSQL
- SQL - PostgreSQL - Audit Trigger
- SQL - PostgreSQL - Basic Instance Information
- SQL - PostgreSQL - Calculating the Median
- SQL - PostgreSQL - Clone Schema
- SQL - PostgreSQL - Count NULLs
- SQL - PostgreSQL - Create modified_at columns and triggers
- SQL - PostgreSQL - Creating Equal-Sized Buckets using ntile
- SQL - PostgreSQL - Cumulative Distribution
- SQL - PostgreSQL - DataDictionary
- SQL - PostgreSQL - Date Dimension Table
- SQL - PostgreSQL - Dump Entire Database to CSV
- SQL - PostgreSQL - Dynamic Trigger
- SQL - PostgreSQL - ETL Function Template
- SQL - PostgreSQL - Extensions
- SQL - PostgreSQL - Extracting Values from JSON Strings
- SQL - PostgreSQL - Filter for the Last x Days
- SQL - PostgreSQL - Find Recent Activity
- SQL - PostgreSQL - Formatting Dates and Timestamps
- SQL - PostgreSQL - Generate Timeseries of Dates and Times
- SQL - PostgreSQL - Get all Primary Keys and Columns
- SQL - PostgreSQL - Get Current DB Sessions
- SQL - PostgreSQL - Get Last Day of Month
- SQL - PostgreSQL - Get the Last Element of an Array
- SQL - PostgreSQL - Histogram Bins
- SQL - PostgreSQL - Human-Readable Timestamps
- SQL - PostgreSQL - Information Schema Queries
- SQL - PostgreSQL - Kill Running or Idle Connections
- SQL - PostgreSQL - MONTH() Equivalent
- SQL - PostgreSQL - Moving Average
- SQL - PostgreSQL - Multi-Replace (plpgsql)
- SQL - PostgreSQL - Normalize Whitespace
- SQL - PostgreSQL - Pivot Query
- SQL - PostgreSQL - Ranking Data
- SQL - PostgreSQL - RegEx to Parse URL String
- SQL - PostgreSQL - RegEx to Validate an Email Address
- SQL - PostgreSQL - Replace Empty Strings with NULLs
- SQL - PostgreSQL - Replace NULLs
- SQL - PostgreSQL - Reverse an Array
- SQL - PostgreSQL - Set Default UTF8 Encoding
- SQL - PostgreSQL - Simulate IIF From SQL Server
- SQL - PostgreSQL - Split a Single Column into Separate Rows
- SQL - PostgreSQL - Stored Procedure - Merge Tables
- SQL - PostgreSQL - Strip Accents from Strings
- SQL - PostgreSQL - UPSERT
- SQL - PostgreSQL String Manipulation
Microsoft SQL Server (MSSQL / T-SQL)¶
Code Snippets for Microsoft’s SQL Server or MSSQL:
- SQL Server
- SQL - SQL Server - Convert Integer (Clarion) Date to SQL Datetime
- SQL - SQL Server - Check if a Column is Accessible
- SQL - SQL Server - Check Size of DB Objects
- SQL - SQL Server - Concatenate Strings
- SQL - SQL Server - Create Date Dimension with Fiscal Years
- SQL - SQL Server - Cumulative Distribution Functions
- SQL - SQL Server - Find the First Row of Each Group
- SQL - SQL Server - Find Unused Indexes
- SQL - SQL Server - Get Number of Open Connections
- SQL - SQL Server - Installation Script for DBA MultiTool
- SQL - SQL Server - Monitor Query Plans
- SQL - SQL Server - POST HTTP API Request
- SQL - SQL Server - Re-build all Indexes
- SQL - SQL Server - Retrieve Stored Procedures and Functions Execution Times Counts and Averages
- SQL - SQL Server - Retrieve Top Slow Requests
- SQL - SQL Server - Retrieve Who is Doing What
- SQL - SQL Server - Search for Text Within Stored Procedures
- SQL - SQL Server - Useful Queries
Windows¶
Batch Scripts¶
#Status/WIP
Miscellaneous¶
Registry (RegEdit)¶
#Status/WIP
- 2-Areas/Code/Windows Registry/Regedit - Enable Long Path Support on Windows
- 2-Areas/Code/Windows Registry/Regedit - Export Saved Registry Favorites
- RegEdit - Restart Explorer and StartMenu Context Bar
- RegEdit - Take Ownership Context Menu
Run Commands¶
#Status/WIP
- Run - Cleanup
- Run - GodMode All Tasks
- Run - Obsidian Vault Launcher
- Run - Resource Monitor
- Run - Startup
Visual Basic¶
#Status/WIP
Visual Basic for Applications (VBA) - Excel VBA¶
Windows Command Line (CMD/MS-DOS)¶
- Windows Command Line - Windows Command Line Code Snippets.
- CMD - Create a Network Performance Windows Report 1
- CMD - Delete Network Data 1
- CMD - Delete Windows Update Leftover Files 1
- CMD - DISM Commands 1
- CMD - FlushDNS
- CMD - Retrieve Stored Wi-Fi Passwords 1
- CMD - Retrieve Windows Credential Manager Saved Secrets 1
- CMD - Run the Hardware Diagnostic Troubleshooter 1
- CMD - Run the WinSAT Diagnostics Score 1
- CMD - Start a Windows Defender Virus Scan
- CMD - View Available Disks on Windows
- CMD - Extended Disk Cleanup 1
- CMD - Memory Diagnostic
- CMD - Troubleshooter Commands
- CMD - View Available Disks on Windows
Windows PowerShell¶
#Status/WIP
Nothing Yet.
MindMap¶
#Status/WIP
Appendix: Links¶
See Also:
- My thiscodeWorks Dashboard: jimbrig - Dashboard | thiscodeWorks
- My GitHub Gists: jimbrig’s gists (github.com)
- My stashed keep commands: Backup for keep - https://github.com/OrkoHunter/keep
Backlinks:
- Tools
- Programming Languages
- Development
- Web Development
- Data Engineering
- Databases