Skip to content

Instantly share code, notes, and snippets.

version: STSv1
mode: testing
mx: noclocks.dev
mx: *.noclocks.dev
mx: send.noclocks.dev
max_age: 604800
@jimbrig
jimbrig / cheatsheet.ps1
Created May 3, 2024 23:20 — forked from pcgeek86/cheatsheet.ps1
PowerShell Cheat Sheet / Quick Reference
Get-Command # Retrieves a list of all the commands available to PowerShell
# (native binaries in $env:PATH + cmdlets / functions from PowerShell modules)
Get-Command -Module Microsoft* # Retrieves a list of all the PowerShell commands exported from modules named Microsoft*
Get-Command -Name *item # Retrieves a list of all commands (native binaries + PowerShell commands) ending in "item"
Get-Help # Get all help topics
Get-Help -Name about_Variables # Get help for a specific about_* topic (aka. man page)
Get-Help -Name Get-Command # Get help for a specific PowerShell function
Get-Help -Name Get-Command -Parameter Module # Get help for a specific parameter on a specific command
@jimbrig
jimbrig / docker-compose.yml
Created April 29, 2024 19:01 — forked from JBGruber/docker-compose.yml
My compose file to run ollama and ollama-webui
version: '3.6'
services:
# ollama and API
ollama:
image: ollama/ollama:latest
container_name: ollama
pull_policy: missing
tty: true
@jimbrig
jimbrig / CorrectRecoveryPartitionSize.ps1
Created April 27, 2024 22:27 — forked from mt7479/CorrectRecoveryPartitionSize.ps1
Resize the recovery partition on Windows 10 Systems to save some space
<#
Correct the default UEFI partition layout created by ConfigMgr to save some disk space.
https://docs.microsoft.com/de-de/windows-hardware/manufacture/desktop/configure-uefigpt-based-hard-drive-partitions
## Notes:
* The recovery partition size for Windows 10 1703 needs to be at least 900 MB or the partition will ignored.
* Windows 10 1511 Winre.wim size: 313.009.179 Bytes
* Windows 10 1607 Winre.wim size: 324.995.101 Bytes
@jimbrig
jimbrig / vs_cpp_winget.md
Created April 25, 2024 22:01 — forked from robotdad/vs_cpp_winget.md
Installing VS C++ workloads with winget

This is a short outline of how to install the C++ workload with Visual Studio or the build tools using winget.

To find VS releases with winget use search. winget search buildtools

The install command will install the VS installer with the core of the selected product installed. That isn't much. So if you use either of these commands to insll VS or the build tools you will need to launch the VS installer afterwards and select the relevant C++ workloads you need.

winget install Microsoft.VisualStudio.2022.BuildTools

winget install Microsoft.VisualStudio.2022.Community
@jimbrig
jimbrig / saveNewAttachmentsToDrive.js
Created April 23, 2024 16:10 — forked from pallocchi/saveNewAttachmentsToDrive.js
Automatically Save Email Attachments to Google Drive Using Google Apps Script
function saveNewAttachmentsToDrive() {
var folderId = "PUT_YOUR_FOLDER_ID_HERE"; // Replace with the ID of the destination folder in Google Drive
var searchQuery = "to:your-email@example.com has:attachment"; // Replace with the search query to find emails with attachments
var lastExecutionTime = getLastExecutionDate();
var threads = GmailApp.search(searchQuery + " after:" + lastExecutionTime);
var driveFolder = DriveApp.getFolderById(folderId);
for (var i = 0; i < threads.length; i++) {
var messages = threads[i].getMessages();
for (var j = 0; j < messages.length; j++) {
var message = messages[j];
@jimbrig
jimbrig / gist:a5fdee8904b3128b27f18d9afba220db
Created April 16, 2024 21:01 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@jimbrig
jimbrig / boxstarter.ps1
Created April 11, 2024 16:02 — forked from jessfraz/boxstarter.ps1
Boxstarter Commands for a new Windows box.
# Description: Boxstarter Script
# Author: Jess Frazelle <jess@linux.com>
# Last Updated: 2017-09-11
#
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
#
# You might need to set: Set-ExecutionPolicy RemoteSigned
#
# Run this boxstarter by calling the following from an **elevated** command-prompt:
@jimbrig
jimbrig / Trace-AICommand.ps1
Created April 11, 2024 16:02 — forked from SQLDBAWithABeard/Trace-AICommand.ps1
Report the results and performance of any scriptblock to Azure Application Insights
#requires -version 7
#You can load this script with $(iwr https://tinyurl.com/TraceAICommand | iex)
using namespace Microsoft.ApplicationInsights
using namespace Microsoft.ApplicationInsights.Extensibility
using namespace Microsoft.ApplicationInsights.DataContracts
using namespace System.Management.Automation
using namespace System.Collections.Generic
using namespace System.Net
#Reference: https://docs.microsoft.com/en-us/azure/azure-monitor/app/console
@jimbrig
jimbrig / comma-first-var.js
Created March 14, 2024 22:49 — forked from isaacs/comma-first-var.js
A better coding convention for lists and object literals in JavaScript
// See comments below.
// This code sample and justification brought to you by
// Isaac Z. Schlueter, aka isaacs
// standard style
var a = "ape",
b = "bat",
c = "cat",
d = "dog",