Skip to content

Instantly share code, notes, and snippets.

Chris chris-brown

Block or report user

Report or block chris-brown

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
chris-brown /
Created Nov 22, 2018
Deletes all docker images for given repository
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'
View idea.js
import styled from 'styled-components';
const MyComponent = styled.div`
background: red;
color: white;
MyComponent.displayName = 'MyComponent';
const ThemeMyComponent = styled(MyComponent).attrs({
View cheat-sheet
# Dev Cheat sheet
> Just a dumping groud to store useful things.
### git alias's
1. deletes all local merged branches
dd = "!git branch -d $(git branch --merged | grep -v master | tr -d ' ')"
dc = "!git branch --merged | grep -v master | tr -d ' '"
View MySolution.sln.DotSettings
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="">
<s:String x:Key="/Default/CodeInspection/CSharpLanguageProject/LanguageLevel/@EntryValue">CSharp50</s:String>
chris-brown / katana-selfhost-helloworld
Created Feb 3, 2015
katana self hosting startup block
View katana-selfhost-helloworld
using (WebApp.Start<Startup>("http://localhost:1234"))
Console.WriteLine("Listening on port: 1234");
View 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, '');
console.log('Server running at');
chris-brown / comma-deliminate-rows
Created Dec 29, 2014
Comma deliminate a collection a data to a singe column
View comma-deliminate-rows
SELECT @tableName = COALESCE(@tableName + ',' ,'') + Name
FROM sys.tables
SELECT @tableName
chris-brown / index.html
Created Dec 23, 2014
simple markup for handlebars demo
View index.html
<!DOCTYPE html>
<title>My demo</title>
<script src=""></script>
<script type="text/javascript" src="scripts/handlebars.runtime.min.js"></script>
<script type="text/javascript" src="scripts/handlebars-templates.js"></script>
<script type="text/javascript" src="app.js"></script>
chris-brown / app.js
Created Dec 23, 2014
renders handlebar template from github api data
View app.js
(function ($j) {
"use strict";
var app = {
query: '',
containerId: '#container',
init: function(){
chris-brown / Gruntfile.js
Created Dec 23, 2014
grunt-handlebars-compiler Gruntfile.js
View Gruntfile.js
module.exports = function(grunt) {
// Project configuration.
pkg: grunt.file.readJSON('package.json'),
handlebars: {
compile: {
src: 'templates/*.handlebars',
dest: 'scripts/handlebars-templates.js'
You can’t perform that action at this time.