Skip to content

Instantly share code, notes, and snippets.

<template>
<input type="file" accept="image/*" multiple files.bind="images"/>
</template>
@fragsalat
fragsalat / MultiObserver.js
Last active January 27, 2017 13:45
Aurelia multi observer class to observe multiple properties on one object or multiple properties on multiple objects. See usage of observe function
import {ObserverLocator, inject} from 'aurelia-framework';
/**
* Helper class to observe multiple properties at once
*/
@inject(ObserverLocator)
export class MultiObserver {
/**
* Get injected observer
var gulp = require('gulp');
var bundler = require('aurelia-bundler');
var vinylPaths = require('vinyl-paths');
var replace = require('gulp-replace');
var runSequence = require('run-sequence');
var del = require('del');
var paths = require('../paths');
var config = {
force: true,
@fragsalat
fragsalat / phalcon-array-validator.php
Last active February 8, 2017 22:19
This is a custom validator for phalcon framework to validate each entry inside a array
<?php
namespace greatshot\system\validation\validator;
use Phalcon\Validation;
use Phalcon\Validation\Message;
use Phalcon\Validation\Validator;
use Phalcon\Validation\ValidatorInterface;
/**
* This class aims to apply a validator to a list of values
*
// **********************************************************************************
// Driver definition for HopeRF RFM69W/RFM69HW/RFM69CW/RFM69HCW, Semtech SX1231/1231H
// **********************************************************************************
// Copyright Felix Rusu (2014), felix@lowpowerlab.com
// http://lowpowerlab.com/
// **********************************************************************************
// License
// **********************************************************************************
// This program is free software; you can redistribute it
// and/or modify it under the terms of the GNU General
// **********************************************************************************
// Driver definition for HopeRF RFM69W/RFM69HW/RFM69CW/RFM69HCW, Semtech SX1231/1231H
// **********************************************************************************
// Copyright Felix Rusu (2014), felix@lowpowerlab.com
// http://lowpowerlab.com/
// **********************************************************************************
// License
// **********************************************************************************
// This program is free software; you can redistribute it
// and/or modify it under the terms of the GNU General
// **********************************************************************************
// Driver definition for HopeRF RFM69W/RFM69HW/RFM69CW/RFM69HCW, Semtech SX1231/1231H
// **********************************************************************************
// Copyright Felix Rusu (2014), felix@lowpowerlab.com
// http://lowpowerlab.com/
// **********************************************************************************
// License
// **********************************************************************************
// This program is free software; you can redistribute it
// and/or modify it under the terms of the GNU General
// **********************************************************************************
// Registers used in driver definition for HopeRF RFM69W/RFM69HW, Semtech SX1231/1231H
// **********************************************************************************
// Copyright Felix Rusu (2015), felix@lowpowerlab.com
// http://lowpowerlab.com/
// **********************************************************************************
// License
// **********************************************************************************
// This program is free software; you can redistribute it
// and/or modify it under the terms of the GNU General
export class CharCode {
static KEYS = {
'219': 223, // ß
'186': 246, // ö
'222': 228, // ä
'188': 44, // ,
'190': 46, // .
'189': 45, // -
'187': 43, // +
@fragsalat
fragsalat / Aurelia introduction paper
Created May 26, 2016 10:59
This document will be used to introduce the framework 'Aurelia' to a company or tech department.
==================
Aurelia
==================
Aurelia is a next generation UI framework based on newest ECMAScript 6/7 specs.
With these framework you can create SPA (single page applications) which are highly maintainable, testable and extensible.
It follows the convention over configuration paradigm but provides the ability to customize everything to your needs.
Existing experience
-------------------
Because of the convention over configuration paradigm the learning curve is really good and you write less and cleaner code.