Skip to content

Instantly share code, notes, and snippets.

View CurlyBytes's full-sized avatar
🎯
Focusing

Cocoy CurlyBytes

🎯
Focusing
View GitHub Profile
@CurlyBytes
CurlyBytes / prepare-commit-msg
Created May 10, 2022 16:32 — forked from gowon/prepare-commit-msg
Prepend git commit message with issue ticket number(s), derived from branch name, using Powershell
#!/bin/sh
echo
exec pwsh -NoLogo -NoProfile -ExecutionPolicy RemoteSigned -Command ".\.git\hooks\prepare-commit-msg.ps1 '$1'"
exit
@CurlyBytes
CurlyBytes / workitem-poster.yml
Created May 4, 2022 08:21 — forked from GerryWilko/workitem-poster.yml
Azure Pipelines Task to Post Comment to Linked Work Items (Bash)
- bash: | # Access Token should need Build Read, Work Item Read & Write, Member Entitlement Management Read
curl -u test@test.com:access-token-xxxxxxxxxxx https://dev.azure.com/{organisation}/{project}/_apis/build/builds/$(build.buildId)/workitems?api-version=6.0 | jq '.value[] | .id' |
while IFS=$"\n" read -r c; do
wid=$(echo $c | tr -dc '0-9')
echo
echo Posting status to work item: $wid
echo
curl -u test@test.com:access-token-xxxxxxxxxxx https://dev.azure.com/{organisation}/{project}/_apis/wit/workItems/$wid/comments?api-version=6.0-preview.3 -X POST --data '{"text": "Build $(Build.BuildNumber) completed with status: $(Agent.JobStatus)"}' -H 'Content-Type: application/json'
echo
done
@CurlyBytes
CurlyBytes / dotnetlayout.md
Created April 9, 2022 18:00 — forked from davidfowl/dotnetlayout.md
.NET project structure
$/
  artifacts/
  build/
  docs/
  lib/
  packages/
  samples/
  src/
 tests/
@CurlyBytes
CurlyBytes / e2e-test-build.yaml
Created August 13, 2021 17:34 — forked from justinyoo/e2e-test-build.yaml
Azure Functions SRE, The First Cut
# Release Pipeline
- stage: Release
jobs:
- deployment: HostedVs2017
...
variables:
- name: TestRunStatus
value: ''
strategy:
- task: VSTest@2
displayName: 'VsTest - Integration Tests'
inputs:
testAssemblyVer2: |
**\MyNamespace.IntegrationTests.dll
!**\*xunit.runner*.dll
!**\obj\**
codeCoverageEnabled: true
diagnosticsEnabled: true
rerunFailedTests: true
@CurlyBytes
CurlyBytes / coco.ps1
Created March 18, 2021 14:25 — forked from ledeniz/coco.ps1
[coco] A small powershell script for backing up a list of installed chocolatey packages #windows
param (
[string]$command = "",
[string]$file = "coco.txt"
)
function listInstalledPrograms() {
choco list --local --id-only --limit-output
}
function dumpInstalledPrograms() {
$ErrorActionPreference = "Stop"
Import-Module -Name PushoverForPS
$outdated = (choco outdated -r | Select-String '^([^|]+)\|.*$').Matches.Groups | Where-Object {$_.Name -eq 1} | ForEach-Object {$_.Value}
$pretty = ($outdated -join ', ')
If ($outdated.count -gt 0) {
Send-Pushover -AppToken TOKENGOESHERE -UserKey KEYGOESHERE -Message "Outdated packages: `n$pretty"
}
@CurlyBytes
CurlyBytes / ddd_cqrs_event-sourcing_in_php.md
Created March 18, 2021 12:58 — forked from jsor/ddd_cqrs_event-sourcing_in_php.md
DDD, CQRS and Event Sourcing in PHP

DDD, CQRS and Event Sourcing in PHP

  • Broadway - Infrastructure and testing helpers for creating CQRS and event sourced applications
  • EventCentric.Core - Event Sourcing and CQRS in PHP
  • LiteCQRS - Small convention based CQRS library for PHP
  • predaddy - Common DDD classes including an annotation driven message bus and tools for CQRS and Event Sourcing
  • ProophEventSourcing - Provides basic functionality for event-sourced aggregates
  • ProophEventStore - PHP 5.4+ EventStore Implementation
  • ProophServiceBus - PHP Enterprise Service Bus Implementation supporting CQRS and DDD
@CurlyBytes
CurlyBytes / rebuild-cache.php
Created January 25, 2020 02:38 — forked from phpdreams/rebuild-cache.php
Speaker List Cache Generation
<?php
// this will read in all the speakers, sort them by date, then store in a file for use later
$speakerList = [
'speaker-file',
];
$speakers_all = [];
foreach($speakerList as $speaker) {
$speakers_all[$speaker] = include_once("./speakers/{$speaker}.php");
$speakers_all[$speaker]['bullet-points'] = text2bullets($speakers_all[$speaker]['bullet-points']);
@CurlyBytes
CurlyBytes / TERMS.md
Created December 11, 2019 16:39
Customize template for Terms

As a work of the United States Government, this package (excluding any exceptions listed below) is in the public domain within the United States. Additionally, we waive copyright and related rights in the work worldwide through the [CC0 1.0 Universal public domain dedication][CC0].

Software source code previously released under an open source license and then modified by CFPB staff or its contractors is considered a "joint work" (see 17 USC § 101); it is partially copyrighted, partially public domain, and as a whole is protected by the copyrights of the non-government authors and must be released according to the terms of the original open-source license.