Skip to content

Instantly share code, notes, and snippets.

View choudeshell's full-sized avatar

Chris Houdeshell choudeshell

View GitHub Profile
@ThYpHo0n
ThYpHo0n / .zshrc
Last active April 11, 2024 19:00
WSL(2) bash profile helpers
# WSL?
if [[ "$(< /proc/sys/kernel/osrelease)" == *microsoft* ]]; then
export $(dbus-launch)
export LIBGL_ALWAYS_INDIRECT=1
export WSL_VERSION=$(wsl.exe -l -v | grep -a '[*]' | sed 's/[^0-9]*//g')
export WSL_HOST=$(tail -1 /etc/resolv.conf | cut -d' ' -f2)
export DISPLAY=$WSL_HOST:0
# pip path if using --user
export PATH=$PATH:$HOME/.local/bin
# SSH
@tusharkant15
tusharkant15 / Konsole Dark Tabs.css
Last active June 5, 2021 13:16
Dark Tabs for console
/* Based on codemedic's work (https://gist.github.com/codemedic/f11cc460b8d9544f9afc) */
QWidget, QTabWidget::pane, QTabWidget::tab-bar {
background-color: #383c4a;
}
QTabBar::tab {
color: #777;
background-color: #383c4a; /* Pick from current color scheme from System Settings > Color > Modify > Colors > Window Background */
font-size: 16px;
height: 32px;
padding: 8px;
@NickCraver
NickCraver / DmpAnalysis.linq
Last active May 1, 2024 21:09
DMP Analysis in LinqPad
<Query Kind="Program">
<NuGetReference Prerelease="true">Microsoft.Diagnostics.Runtime</NuGetReference>
<Namespace>Microsoft.Diagnostics.Runtime</Namespace>
<Namespace>System</Namespace>
<Namespace>System.IO</Namespace>
<Namespace>System.Linq</Namespace>
<Namespace>System.Text</Namespace>
<Namespace>Microsoft.Diagnostics.Runtime.Utilities</Namespace>
</Query>
@davidfowl
davidfowl / dotnetlayout.md
Last active May 3, 2024 08:40
.NET project structure
$/
  artifacts/
  build/
  docs/
  lib/
  packages/
  samples/
  src/
 tests/
@nodesocket
nodesocket / bootstrap.flatten.css
Last active April 1, 2021 23:37
Below are simple styles to "flatten" bootstrap. I didn't go through every control and widget that bootstrap offers, only what was required for https://commando.io, so your milage may vary.
/* Flatten das boostrap */
.well, .navbar-inner, .popover, .btn, .tooltip, input, select, textarea, pre, .progress, .modal, .add-on, .alert, .table-bordered, .nav>.active>a, .dropdown-menu, .tooltip-inner, .badge, .label, .img-polaroid {
-moz-box-shadow: none !important;
-webkit-box-shadow: none !important;
box-shadow: none !important;
-webkit-border-radius: 0px !important;
-moz-border-radius: 0px !important;
border-radius: 0px !important;
border-collapse: collapse !important;
background-image: none !important;
@bradwilson
bradwilson / NameTaskReturningMethodAppropriately.cs
Last active December 15, 2015 11:09
FxCop rule to ensure that Task-returning methods are suffixed with 'Async'
using System.Runtime.CompilerServices;
using Microsoft.FxCop.Sdk;
namespace Tier3.FxCop.TaskRules
{
public class NameTaskReturningMethodAppropriately : BaseIntrospectionRule
{
public NameTaskReturningMethodAppropriately() :
base("NameTaskReturningMethodAppropriately",
"Tier3.FxCop.Rules",
@adamjasinski
adamjasinski / TheoryWithDataDisposalAttribute.cs
Last active December 10, 2015 00:38
xUnit TheoryAttribute specialization with data disposal facility
using System;
using System.Collections.Generic;
using System.Linq;
using Xunit.Extensions;
using Xunit.Sdk;
namespace Prototypes.Xunit.Extensions;
{
/// <summary>
/// Theory that disposes data items after finishing the execution.