Skip to content

Instantly share code, notes, and snippets.

View PureKrome's full-sized avatar
💭
🦘🕺🏻🎶🕹

Justin Adler PureKrome

💭
🦘🕺🏻🎶🕹
View GitHub Profile
@sixeyed
sixeyed / profile.ps1
Created November 1, 2018 11:25
PowerShell profile with a Linux-style prompt and aliases for common Docker commands
function Prompt(){
$W = Split-Path -leaf -path (Get-Location)
$prompt = Write-Prompt "$($env:UserName)@$($env:ComputerName):" -ForegroundColor Green
$prompt += Write-Prompt $W -ForegroundColor DarkCyan
$prompt += Write-Prompt '>'
return ' '
}
function Remove-StoppedContainers {
docker container rm $(docker container ls -q)
@davidfowl
davidfowl / MinimalAPIs.md
Last active March 16, 2025 16:47
Minimal APIs at a glance
@PureKrome
PureKrome / Node-plus-Docker.md
Last active February 28, 2025 02:54
Running NPM inside a docker container

How to run some Node code in Docker because you're smart and don't want to have evil Node installed on your PC.

NODE DOCKER VERSIONS: https://hub.docker.com/_/node


docker run --rm -it -v ${PWD}:/src/someProject --name npm-stuff node /bin/bash
@egil
egil / Program.cs
Last active December 18, 2024 14:03
Custom "Import database" and "Import BacPac" Aspire commands for a SQL Server Database resource. The first will create a bacpac from a source database and import that bacpac into the Aspire SQL Database resource. The latter will use an existing bacpac file and import that.
var builder = DistributedApplication.CreateBuilder(args);
var sqlPassword = builder.AddParameter("sql-password", secret: true);
var sqlserver = builder
.AddSqlServer("sqlserver", password: sqlPassword)
.WithDataVolume()
.WithLifetime(ContainerLifetime.Persistent);
var importSourceConnectionString = "Server=[REPLACE].database.windows.net;Authentication=Active Directory Interactive;Database=[REPLACE];Encrypt=True;"
var db = sqlserver