Skip to content

Instantly share code, notes, and snippets.

View kwk's full-sized avatar

Konrad Kleine kwk

View GitHub Profile
@Munter
Munter / install_assetgraph.sh
Created July 12, 2011 22:28
Assetgraph bootstrap
#!/bin/sh
# Install dependencies
sudo apt-get install git libssl-dev libcairo2-dev libgif-dev libjpeg8-dev optipng pngcrush pngquant
# Install Node.js v0.4
git clone git://github.com/joyent/node
cd node
git checkout v0.4
make distclean # Only necessary if you've compiled from the same checkout before
@kwk
kwk / check-php-syntax.sh
Created September 16, 2011 10:08
Check PHP-files (added/modified/removed/or unknown) in Mercurial for PHP-Syntax errors
for i in `hg st --no-status $(hg root)`; do mimetype $i | grep php > /dev/null && php -l $i; done
@aslakknutsen
aslakknutsen / design.go
Created October 27, 2016 14:18
json api ish Goa struct
// ALMRelationship describes the basic relationship
var ALMRelationship = Type("ALMRelationship", func() {
Attribute("data", ArrayOf(Any))
})
// ALMLink describes a single linked resource
var ALMLink = Type("ALMLink", func() {
Attribute("href", Integer, "Unique numeric representation of the error")
Attribute("meta", HashOf(String, Any), "Related meta information")
})
db := requires.Resource(t, Database)
space, wis := requires.Objects(t, Space(1), WorkItems(3, ExtraLongTitle()))
func ExtraLongTitle()  {
return func(wi *WorkItem) {
wi.Data.Attributes["system.title"] = ".. long thing.."
}
}
@aslakknutsen
aslakknutsen / design.go
Last active September 28, 2017 08:52
JSON API ResourceObject GOA
// Definition
/*
func test() {
account := app.AccountSingle{}
account.Data.ID
account.Data.Type
account.Data.Attributes.Name
account.Data.Relationships.OwnedBy
account.Data.Relationships.OwnedBy.Meta
account.Data.Relationships.OwnedBy.Related

Install Strimzi on Minishift

  • start minishift with a profile named kafka

on macOS

minishift --profile kafka start --vm-driver=xhyve --memory=7000 --cpus=4 --disk-size=50g

on linux

@lattner
lattner / LLVMDecisionMaking.md
Last active May 24, 2020 22:31
[PITCH] Improvements to LLVM Decision Making

MOVED

This doc has been moved to A Google doc to allow easier commenting and collaboration.

@pop
pop / README.md
Created November 18, 2016 22:03
Buildbot on K8s
@kwk
kwk / timeular-activity-time.sh
Last active April 16, 2021 19:59
Display amount of time spent in activity tracked by timeular for the current day
#!/bin/bash
set -e
# Go here to create or refresh an API key and API secret and paste them:
# https://profile.timeular.com/#/app/account
# Put this in your ~/.timeular.config
# API_KEY="..."
# API_SECRET="..."
@pqnelson
pqnelson / filter-uses.py
Created February 25, 2019 15:18
Noweb syntax highlighting
#!/usr/bin/env python
import fileinput
from re import sub
deletemode = False
codemode = False
asmmode = False
breakmode = False