Skip to content

Instantly share code, notes, and snippets.

View maddindeiss's full-sized avatar
👍

Martin Deiss maddindeiss

👍
  • Garden of Concepts GmbH
  • Frankfurt, Germany
View GitHub Profile
@rossholdway
rossholdway / Ionic environment
Last active January 5, 2021 21:19
A script to run before the ionic build process that generates an app.config.ts file based off of a .env/{environment}.json file. See this comment for more info: https://github.com/ionic-team/ionic-app-scripts/issues/762#issuecomment-295235407
#!/usr/bin/env node
var path = require('path');
var process = require('process');
var fs = require('fs');
class Environment {
constructor(args) {
args = JSON.parse(args).original;
const defaultEnv = 'development'; //Set default environment
let env;
@GFoley83
GFoley83 / message-bus.service.ts
Last active June 2, 2020 12:55
Angular 2 Message Bus / PubSub ex.
import { Injectable } from "@angular/core";
import { ReplaySubject, Observable } from "rxjs/Rx";
interface Message {
channel: string;
data: any;
}
@Injectable()
export class MessageBus {
@copperlight
copperlight / .bashrc
Created August 11, 2016 16:27
Window Subsystem for Linux ssh-agent Configuraton
# ... more above ...
# wsfl bash is not a login shell
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
fi
# ssh-agent configuration
if [ -z "$(pgrep ssh-agent)" ]; then
rm -rf /tmp/ssh-*
@Sup3rc4l1fr4g1l1571c3xp14l1d0c10u5
Sup3rc4l1fr4g1l1571c3xp14l1d0c10u5 / TopologicalSort.cs
Created June 18, 2016 15:15
Topological Sorting (Kahn's algorithm) implemented in C#
using System;
using System.Collections.Generic;
using System.Linq;
namespace TopologicalSort {
static class Program {
static void Main() {
//
// digraph G {
// "7" -> "11"