Skip to content

Instantly share code, notes, and snippets.

View sclausen's full-sized avatar

Sebastian Clausen sclausen

  • appmotion GmbH
  • Rosendahl, Germany
View GitHub Profile
@sclausen
sclausen / custom_time_picker.dart
Created May 28, 2020 15:07
Material Time Picker with passing Times to show
// @formatter:off
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:async';
import 'dart:math' as math;
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
@sclausen
sclausen / on-init.directive.spec.ts
Created December 11, 2018 08:20
AngularJS ng-init for angular
import { Component } from '@angular/core';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { OnInitDirective } from './on-init.directive';
describe('OnInitDirective', () => {
let component: TestOnInitComponent;
let fixture: ComponentFixture<TestOnInitComponent>;
beforeEach(() => {
TestBed.configureTestingModule({
@sclausen
sclausen / ionic-build-error.log
Created March 1, 2016 15:53
ionic build browser error
/usr/lib/~/ionic-framework/config/directives.js
Module not found: Error: Cannot resolve module 'strip-sourcemap' in /usr/lib/node_modules/ionic-framework/config
resolve module strip-sourcemap in /usr/lib/node_modules/ionic-framework/config
looking for modules in /usr/lib/node_modules/ionic-framework/node_modules
module variation strip-sourcemap-webpack-loader
/usr/lib/node_modules/ionic-framework/node_modules/strip-sourcemap-webpack-loader doesn't exist (module as directory)
resolve 'file' strip-sourcemap-webpack-loader in /usr/lib/node_modules/ionic-framework/node_modules
resolve file
/usr/lib/node_modules/ionic-framework/node_modules/strip-sourcemap-webpack-loader doesn't exist
/usr/lib/node_modules/ionic-framework/node_modules/strip-sourcemap-webpack-loader.webpack-loader.js doesn't exist
@sclausen
sclausen / gist:e6196d6ad93564e87641
Last active August 29, 2015 14:21
recommended atom packages
angularjs,atom-bootstrap3,atom-jshint,autocomplete-paths,autocomplete-plus,autocomplete-snippets,block-comment,autocomplete-css,autocomplete-html,docblockr,git-diff,highlight-line,sublime-tabs,sort-lines,minimap,project-manager,wrap-guide,file-icons
@sclausen
sclausen / gist:cf70d319e917e33f11cd
Created October 30, 2014 23:31
example package.js
Package.describe({
summary: 'Fancy Package',
version: '1.0.0',
name: 'mark:fancy-package',
git: 'https://github.com/mark/fancy-package.git'
});
this.route("foo", {
waitOn: function() {
return subs.subscribe("foo")
},
data: function() {
if (this.ready()) {
return {
foos: Foo.find()
}
}
Template.foo.helpers({
data1: function(){
var array = [];
var storedData = Session.get("data");
//underscore
_.each(Object.keys(storedData),function(key){
array.push(storedData[key]);
});
return array;
},