Skip to content

Instantly share code, notes, and snippets.

@blueskyfish
blueskyfish / Dockerfile
Last active Sep 15, 2020
A docker file in order to build node application with multi stage
View Dockerfile
#
# Multipart dockerfile for build the application and the delivery docker image
#
FROM node:12-alpine AS builder
WORKDIR /builder
RUN \
apk add --update tree openssl && \
mkdir -p /builder/frontend/src /builder/app /builder/backend/src
@blueskyfish
blueskyfish / subscriber-list.ts
Created Feb 19, 2020
Collection of Subscription
View subscriber-list.ts
import { SubscriptionLike } from 'rxjs';
export class SubscriberList implements SubscriptionLike {
private mList: SubscriptionLike[] = [];
private mClosed = false;
get closed(): boolean {
return this.mClosed;
@blueskyfish
blueskyfish / _mixins.scss
Created Feb 19, 2020
Mixins for Angular App
View _mixins.scss
@mixin display-flex($direction, $wrap: nowrap) {
display: flex;
flex-direction: $direction;
flex-wrap: $wrap;
}
@mixin flex-resizable($basis: auto, $grow: 1, $shrink: 1) {
flex-basis: $basis;
flex-grow: $grow;
View Redux-Trigger-Service.md

ReduxTrigger

A small angular service for trigger action when certain conditions occur.

Using the Angular module @angular-redux/store.

Example

Trigger a list of Redux Action

@blueskyfish
blueskyfish / messaging.service.ts
Last active May 31, 2018
Messaging in Angular 4+
View messaging.service.ts
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs/Observable';
import { Subject } from 'rxjs/Subject';
import 'rxjs/add/operator/filter';
import 'rxjs/add/operator/map';
/**
* **Note**: The internal structure of the message queue.
*/
export interface IMessage {
@blueskyfish
blueskyfish / user-route.js
Created Apr 8, 2017
Database with transaction
View user-route.js
'use strict';
const express = require('express');
const executor = require('app/executor');
const userService = require('app/service/user-service');
//
// Router: /users
@blueskyfish
blueskyfish / MyFixedHandler
Created Mar 15, 2015
Add the java logging to the Android platform
View MyFixedHandler
package kirchnerei.httpclient;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.util.Formatter;
import java.util.logging.Level;
import java.util.logging.LogRecord;
import java.util.logging.Logger;
public class MyHandlerHandler extends Handler implements DalvikLogHandler {
@blueskyfish
blueskyfish / Gruntfile.js
Created Dec 11, 2014
Basic Grunt / Npm / Bower files
View Gruntfile.js
module.exports = function (grunt) {
var _stage = grunt.option('stage') || 'dev',
_basePath,
_todayDate = grunt.template.today('yyyy-mm-dd'),
_todayTime = grunt.template.today('HH-MM-ss'),
_replacePattern = [];
switch (_stage.toLowerCase()) {
case 'prod':
@blueskyfish
blueskyfish / Command.java
Last active Aug 29, 2015
NumberModel with Command Pattern
View Command.java
/*
* Copyright (c) 2014. BlueSkyFish <blueskyfish@kirchnerei.de>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
* of the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
@blueskyfish
blueskyfish / pom.xml
Last active Aug 29, 2015
pom.xml for create a über.jar
View pom.xml
<build>
<finalName>${project.artifactId}</finalName>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<plugins>
<plugin>