Skip to content

Instantly share code, notes, and snippets.

View Gh0stWalk3r's full-sized avatar
⚔️
Always build before commit

Gregor Dostal Gh0stWalk3r

⚔️
Always build before commit
View GitHub Profile
@NickCraver
NickCraver / TimingExample.ps1
Last active November 5, 2022 20:59
Quick example of how to use script blocks to track timing in an easy-to-wrap way in PowerShell for things like stages of a build
# Track build time components below
$steps = [System.Collections.Generic.List[PSObject]]@()
function TrackTime {
Param(
[string]$name,
[scriptblock]$script
)
Write-Host ""
Write-Host -ForegroundColor Blue "[$(([DateTime](Get-Date)).ToString("u"))] Step: $name"
using System;
using System.Threading.Tasks;
namespace System.Collections.Concurrent
{
public static class ConcurrentDictionaryExtensions
{
/// <summary>
/// Provides an alternative to <see cref="ConcurrentDictionary{TKey, TValue}.GetOrAdd(TKey, Func{TKey, TValue})"/> that disposes values that implement <see cref="IDisposable"/>.
/// </summary>
@181192
181192 / increase_root_fedora.md
Last active March 1, 2024 03:24
How to increase the root partition size on Fedora

How to increase the root partition size on Fedora

Boot up with an Fedora Live USB stick.

  1. Run vgs to check if there's any space:
$ sudo vgs
  VG     #PV #LV #SN Attr   VSize    VFree
  fedora   1   3   0 wz--n- <237.28g    0 
@dasMulli
dasMulli / Directory.Build.targets
Last active February 21, 2022 23:44
CI build script for a mvc + Webpack SPA app
<Project>
<Target Name="NpmInstall" Condition="Exists('package.json')">
<Exec Command="npm install" />
</Target>
<Target Name="NpmCiTest" Condition="Exists('package.json')">
<Exec Command="npm run ci-test" />
<ItemGroup Condition="'$(TestResultsOutputPath)' != ''">
<TestResultFiles Include="obj\karma-testresults\**" />
@CodeMyUI
CodeMyUI / index.html
Created October 28, 2016 05:42
THREE Image Transition
<div id="three-container"></div>
<div id="instructions">
click and drag to control the animation
</div>
@davidfowl
davidfowl / dotnetlayout.md
Last active May 3, 2024 08:40
.NET project structure
$/
  artifacts/
  build/
  docs/
  lib/
  packages/
  samples/
  src/
 tests/
@codingoutloud
codingoutloud / make-keys.bat
Last active August 3, 2023 19:05
Handy OpenSSL command-line combinations I've used - they might've been hard to find or come up with, so capturing them here.
@echo off
if _%1_==__ goto USAGE
openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout mycert.pem -out mycert.pem -subj "/CN=My Cert Name"
openssl pkcs12 -export -out mycert.pfx -inkey mycert.pem -in mycert.pem -passout pass:%1
openssl x509 -inform pem -in mycert.pem -outform der -out mycert.cer
openssl pkcs12 -in mycert.pfx -nodes -passin pass:%1 | openssl x509 -noout -fingerprint
openssl x509 -in mycert.pem -noout -fingerprint
@hofmannsven
hofmannsven / README.md
Last active May 3, 2024 15:30
Git CLI Cheatsheet
@sayedihashimi
sayedihashimi / msbuild-get-date.proj
Created March 23, 2012 03:02
MSBuild how to get a good formatted date
<Project
xmlns="http://schemas.microsoft.com/developer/msbuild/2003"
ToolsVersion="4.0"
DefaultTargets="Demo" >
<Target Name="Demo">
<PropertyGroup>
<CurrentDate>$([System.DateTime]::Now.ToString(yyyyMMdd-mmss))</CurrentDate>
</PropertyGroup>