Skip to content

Instantly share code, notes, and snippets.

View chris-brown's full-sized avatar

Chris chris-brown

View GitHub Profile
@chris-brown
chris-brown / Setup.md
Last active December 21, 2021 10:54
Setup instructions for Windows Terminal and VS Code.
@chris-brown
chris-brown / settings.json
Created December 21, 2021 10:35
Terminal Settings
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"actions":
[
{
"command":
{
"action": "copy",
"singleLine": false
},
@chris-brown
chris-brown / Microsoft.PowerShell_profile.ps1
Last active December 21, 2021 10:55
Powershelll Profile
Import-Module posh-git
Import-Module Terminal-Icons
Set-PoshPrompt -Theme C:\Users\*changeme*\.powerline-override.json
# This key handler shows the entire or filtered history using Out-GridView. The
# typed text is used as the substring pattern for filtering. A selected command
# is inserted to the command line without invoking. Multiple command selection
# is supported, e.g. selected by Ctrl + Click.
Set-PSReadLineKeyHandler -Key F7 `
-BriefDescription History `
@chris-brown
chris-brown / .powerline.omp.json
Last active October 18, 2021 18:48
Ow my posh configuration
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"blocks": [
{
"alignment": "left",
"segments": [
{
"background": "transparent",
"foreground": "#ffffff",
"powerline_symbol": "",
@chris-brown
chris-brown / delete-images.sh
Created November 22, 2018 10:52
Deletes all docker images for given repository
registry='https://docker-registry.laterooms.io:5000'
names='tlrg/logstash-hra-pipe'
for name in ${names}; do for n in $(
for p in $(curl -sSL "${registry}/v2/${name}/tags/list" | jq -r '.tags[]'); do
curl -sSL -I \
-H "Accept: application/vnd.docker.distribution.manifest.v2+json" \
"${registry}/v2/${name}/manifests/${p}" \
| awk '$1 == "docker-content-digest:" { print $2 }' \
| tr -d $'\r'
import styled from 'styled-components';
const MyComponent = styled.div`
background: red;
color: white;
`;
MyComponent.displayName = 'MyComponent';
const ThemeMyComponent = styled(MyComponent).attrs({
# Dev Cheat sheet
> Just a dumping groud to store useful things.
### git alias's
1. deletes all local merged branches
`[alias]
dd = "!git branch -d $(git branch --merged | grep -v master | tr -d ' ')"
dc = "!git branch --merged | grep -v master | tr -d ' '"
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:String x:Key="/Default/CodeInspection/CSharpLanguageProject/LanguageLevel/@EntryValue">CSharp50</s:String>
</wpf:ResourceDictionary>
@chris-brown
chris-brown / katana-selfhost-helloworld
Created February 3, 2015 21:39
katana self hosting startup block
using (WebApp.Start<Startup>("http://localhost:1234"))
{
Console.WriteLine("Listening on port: 1234");
Console.ReadLine();
}
@chris-brown
chris-brown / nodejs-hello-world
Created February 3, 2015 21:33
NodeJS Hello World
var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello World\n');
}).listen(1337, '127.0.0.1');
console.log('Server running at http://127.0.0.1:1337/');