Skip to content

Instantly share code, notes, and snippets.

View dohomi's full-sized avatar
🎯
Focusing

Dominic Garms dohomi

🎯
Focusing
View GitHub Profile
@dohomi
dohomi / club.html
Last active August 29, 2015 14:00
SimpleSchema in Collection2 with autoValue
{{#autoForm collection=Collections.Clubs id="createClubForm" type="method" meteormethod="createClub"}}
<div class="form-group {{#if afFieldIsInvalid name='name'}}has-error{{/if}}">
<div class="input-group">
<span class="input-group-addon">
Name
</span>
{{>afFieldInput name="name"}}
<span class="input-group-btn">
<button type="submit" class="btn btn-primary">
@dohomi
dohomi / helper.js
Last active August 29, 2015 14:01
Simple filter over collection
Template.exerciseList.events({
"keyup .js-exercise-text-search": function (ev, templ) {
Session.set("ExerciseListFilter", {"name": {$regex: ev.currentTarget.value, $options: 'i'}});
}
});
Template.exerciseList.helpers({
exercises: function () {
<template name="pageTreeNav">
<div id="pageTree" class="js-pa-sortable js-pa-container" data-parent-id="null">
{{#each getPageNodes}}
{{> pageTreeItem itemData=. level="2"}}
{{/each}}
</div>
</template>
<template name="pageTreeItem">
@dohomi
dohomi / client.js
Last active August 29, 2015 14:09
autoform pure schema validation create user
Template.registerHelper(Schemas, Schema);
Router.configure({
layoutTemplate: 'layoutBackend',
notFoundTemplate: 'page404',
loadingTemplate: 'loading',
i18n: {
languages: TP.Const.AllowedLangKey,
setLanguage: function (lang) {
if (Meteor.isClient) {
TP.Core.Functions.setLanguageKey(lang);
@dohomi
dohomi / button.tpl.html
Last active August 29, 2015 14:17
Include ng-mfb in combination with ngMaterial
<li>
<a href="" data-mfb-label="{{label}}" class=" md-button md-default-theme md-fab mfb-component__button--child"
ng-include="customContent">
<script type="text/ng-template" id="NGMFB_child-icon-template">
<i class="mfb-component__child-icon {{icon}}"></i>
</script>
</a>
</li>
@dohomi
dohomi / gist:8647189
Created January 27, 2014 11:46
PackageStates
<?php
# PackageStates.php
# This file is maintained by Flow's package management. Although you can edit it
# manually, you should rather use the command line commands for maintaining packages.
# You'll find detailed information about the typo3.flow:package:* commands in their
# respective help screens.
# This file will be regenerated automatically if it doesn't exist. Deleting this file
# should, however, never become necessary if you use the package commands.
@dohomi
dohomi / gist:8667357
Created January 28, 2014 13:12
Find node with _name property
${q(site).find('instanceof TYPO3.Neos:Document').property('_name') == 'blog'}
@dohomi
dohomi / events.html
Last active May 6, 2016 08:37
angular-meteor with ui-calendar init
<div id="eventCalendar" ui-calendar="eventCtrl.calendarConfig" ng-model="eventCtrl.eventSources" calendar="eventCalendar"></div>
@dohomi
dohomi / async_select_vuetify.vue
Created August 10, 2017 01:01
simple autocomplete with debounce async search
<template>
<v-select
v-model="state"
label="Select"
:items="states"
@input.native="loadStates"
autocomplete
></v-select>
</template>