Skip to content

Instantly share code, notes, and snippets.

@albulescu
albulescu / StyleChangeWatcher.js
Created July 15, 2016 13:18
Angular 2 style change watcher
const watcher = new StyleChangeWatcher();
watcher.watch(element, ["width"]);
watcher.observer.subscribe((event:StyleChangeEvent) => {
console.log('Element:', event.element);
console.log('Change:', event.change.property,':', event.change.previous, '=>', event.change.current);
});
@albulescu
albulescu / TypeingListen.ts
Created August 23, 2016 19:17
Listen for passwords while on page
import { Injectable, EventEmitter } from '@angular/core';
@Injectable()
export class TypeingListen extends EventEmitter<boolean> {
private keyStack:string[] = [];
private emptyInterval:any;
constructor( private password:String ) {
@albulescu
albulescu / YamahaProtocol.md
Last active December 5, 2023 09:48
Yamaha Protocol

API

Requests

POST - /YamahaRemoteControl/ctrl

CURL

curl -X POST "http://192.168.0.100/YamahaRemoteControl/ctrl" \
<td md-cell>
<div ng-if="!result.osd.csmInstruction || result.enableFlag">
<md-select ng-if="!$ctrl.cp" name="status" ng-init="result.enableFlag='true'" ng-model="result.osd.csmInstruction" aria-label="status" placeholder="Select">
<md-option value="">Select</md-option>
<md-option value="Hold for Decision">Hold for Decision</md-option>
</md-select>
<span ng-if="$ctrl.cp">
{{result.status | na}}
</span>
</div>
@albulescu
albulescu / localstorage_property.ts
Created December 15, 2016 21:53
Local Storage Property Binding
export function LocalStorageProperty(property:string) {
return function(target: any, propertyKey: string | symbol) {
var _ref_ = window['Reflect'];
var meta, type;
if(_ref_.getMetadata) {
meta = _ref_.getMetadata('design:type', target, propertyKey);
var result = /^function\s+([\w\$]+)\s*\(/.exec( meta.toString() )
var fnName = result ? result[ 1 ] : '';
if(fnName && fnName.length) {
@EventBusBind
@Component({
selector: 'wpci-header',
templateUrl: './header.component.html',
styleUrls: ['./header.component.less']
})
export class HeaderComponent implements OnInit {
ngOnInit() {}

Code Audit:

Meteor drawbacks:

I. You're stick to the "normal" way of Meteor development and you can't work how you want without installing a package that do some job. That also might be no problem because packages do more than what you want and this increase filesize and this will increase the loading time of the app.

II. Its hard to debug, when there are problems. Its very hard to investigate and find a solution and this increase development time

III. The current app is bound to unnecessary external services like

Refactoring Proposal

Plan

  • Decouple backend from meteor and create new application
  • Rewrite front-end functionality using new designs
  • Continous deploy for live preview
    • Frontend on beta.nerdly.io
    • Backend on api.nerdly.io
  • Focus on things from MVP and what is already done

Questions

1. What is the output of the following program?

package main
import "fmt"
type User struct {
	Name string
}
var user User

Current iteration #3

1. Booking

1.1 Classes Backend 90%

Backend functionality for classes/booking notification when creating a class and so on

1.2 Search booking UI 50% -> 70% -> 99% ( Bugs remaning )