Skip to content

Instantly share code, notes, and snippets.

@JohannesRudolph
JohannesRudolph / oceanicnext.tweaked
Created July 21, 2017 10:24
concg PowershellTheme oceanicnext.tweaked
{
"black": "#1b2b34",
"dark_blue": "#6699cc",
"dark_green": "#99c794",
"dark_cyan": "#5fb3b3",
"dark_red": "#ec5f67",
"dark_magenta": "#ab7967",
"dark_yellow": "#fac863",
"gray": "#cdd3de",
"dark_gray": "#808080",
@JohannesRudolph
JohannesRudolph / bumpme
Last active October 23, 2017 19:40
bump-date
Mon Oct 23 19:40:21 UTC 2017
oot@a091836af616:/# curl http://127.0.0.1:8079/debug/pprof/goroutine?debug=2
goroutine 42169 [running]:
runtime/pprof.writeGoroutineStacks(0xf2358a0, 0xc42008e0e0, 0x30, 0xc4202d1a40)
/usr/local/go/src/runtime/pprof/pprof.go:603 +0x79
runtime/pprof.writeGoroutine(0xf2358a0, 0xc42008e0e0, 0x2, 0xc4204bea90, 0x411ec8)
/usr/local/go/src/runtime/pprof/pprof.go:592 +0x44
runtime/pprof.(*Profile).WriteTo(0xf2162a0, 0xf2358a0, 0xc42008e0e0, 0x2, 0xc42008e0e0, 0xc4204becc0)
/usr/local/go/src/runtime/pprof/pprof.go:302 +0x3b5
net/http/pprof.handler.ServeHTTP(0xc4202d1751, 0x9, 0xf2418a0, 0xc42008e0e0, 0xc420142500)
/usr/local/go/src/net/http/pprof/pprof.go:209 +0x1d1
@JohannesRudolph
JohannesRudolph / lazylibs.service.ts
Created May 7, 2017 16:53
Angular lazy library loader
import { Injectable, Inject } from '@angular/core';
import { Observable } from 'rxjs/Observable';
import { ReplaySubject } from 'rxjs/ReplaySubject';
import { DOCUMENT } from '@angular/platform-browser';
@Injectable()
export class LazylibsService {
private chartJs?: ReplaySubject<any>;
@JohannesRudolph
JohannesRudolph / hal.ts
Created March 2, 2017 15:26
HAL Models with TypeScript 2.1
export type HalUrl = string;
export interface HalLink {
href: HalUrl;
}
export interface HalObjectLinks {
self: HalLink;
}
@JohannesRudolph
JohannesRudolph / docker-compose.yml
Last active August 25, 2017 23:38
Concourse on Docker with Let's Encrypt
## NOTE:
## because this docker-compose.yml is designed to work with a remote docker-machine,
## all mounted volume paths are currently relative to /concourse-data, data is thus stored on the docker host
nginx:
image: nginx
container_name: nginx
ports:
- "80:80"
- "443:443"
@JohannesRudolph
JohannesRudolph / browser.js
Created December 17, 2016 08:01 — forked from pamelafox/browser.js
Browser banner warning
(function(wndw) {
var Browsers, OS, Platform, Versions, browser_name, browser_version, os, platform;
Versions = {
Firefox: /firefox\/([\d\w\.\-]+)/i,
IE: /msie\s([\d\.]+[\d])/i,
Chrome: /chrome\/([\d\w\.\-]+)/i,
Safari: /version\/([\d\w\.\-]+)/i,
Ps3: /([\d\w\.\-]+)\)\s*$/i,
Psp: /([\d\w\.\-]+)\)?\s*$/i
};
@JohannesRudolph
JohannesRudolph / time-ago.pipe.spec.ts
Created December 1, 2016 09:58
Angular2 TimeAgo Pipe
import { fakeAsync, tick } from '@angular/core/testing';
import { Observable } from 'rxjs/Observable';
import 'rxjs/add/observable/interval';
import 'rxjs/add/operator/takeWhile';
import { TimeAgoPipe } from './time-ago.pipe';
import { WrappedValue } from '@angular/core';
// Learning
@JohannesRudolph
JohannesRudolph / Readme
Created May 6, 2016 07:21
Install TU Darmstadt Latex Report Template on OSX El Capitan
Install MacTex 2015 or later: https://tug.org/mactex/
Go to http://exp1.fkp.physik.tu-darmstadt.de/tuddesign/ and download the zip packages.
Disregard the OS X installation instructions on the website, they don't work on El Capitan (and assume global installation, whereas we want user installation)
$unzip latex-tuddesign_current.zip -d ~/Library/
$unzip tudfonts-tex_current.zip -d ~/Library/
You should have a ~Library/texmf after this operation. Then we need to rebuild the texmf database in ~/Library
@JohannesRudolph
JohannesRudolph / MigrateVSColorSchemeTo2015.cs
Created January 3, 2016 14:33
MigrateVSColorSchemeTo2015
string settings = File.ReadAllText(@"C:\Users\johannes.rudolph\Documents\Visual Studio 2015\Settings\jrMonokai.vssettings");
var map = new Dictionary<string, string>()
{
{"Brace Matching (Rectangle)", "brace matching" },
{"String(C# @ Verbatim)", "string - verbatim" },
{"User Types", "class name"},
{"User Types(Enums)", "enum name"},
{"User Types(Interfaces)", " interface name"},
{"User Types(Delegates)", "delegate name"},