Skip to content

Instantly share code, notes, and snippets.

@bravo-kernel
bravo-kernel / Projects.vue
Last active June 24, 2019 14:20
Feathers-vuex mapActions and mapGetters
<template>
<div id="projects">
<h1>Projects</h1>
<p>
Data will be inserted here from the API, or death !
</p>
<ul class="mt-5">
<li
@bravo-kernel
bravo-kernel / azure-pipelines.yml
Last active April 26, 2024 12:35
Multi-stage Azure Devops Pipeline with cross-platform matrix
# Determines which branch(es) will cause a CI build to be started
trigger:
- master
# Stages precede strategy, in other words each stage can contain a strategy (or multiple or none)
# Full run-cylce described here: https://docs.microsoft.com/en-us/azure/devops/pipelines/process/runs?view=azure-devops
stages:
- stage: Prepare
jobs:
- job:
@bravo-kernel
bravo-kernel / controllers.application.js
Last active December 4, 2018 18:50
Higher Order Component (x-modal)
import Controller from "@ember/controller";
import { action } from "@ember-decorators/object";
export default class Application extends Controller {
constructor() {
super(...arguments);
this.showModal = false;
}
@action
@bravo-kernel
bravo-kernel / components.card-controls.js
Last active December 4, 2018 17:32
Testing nested blocks vs blockless
import Ember from 'ember';
export default Ember.Component.extend({
});
@bravo-kernel
bravo-kernel / templates.hbs
Last active August 18, 2022 17:36
Ember Components
{{!-- card-deck.hbs --}}
<div class="card-deck">
{{#each model as |entity|}}
<CardDeckCard @entity={{entity}} @cardType={{cardType}} />
{{/each}}
</div>
{{!-- card-deck-card --}}
<div class="card my-3">
@bravo-kernel
bravo-kernel / set-id-uuidv4.js
Last active September 9, 2018 17:48
My first hook: setIdUuidv4
// Use this hook to set the `.id` property of an item/record to a freshly generated uuidv4.
//
// Requires https://github.com/kelektiv/node-uuid
const { checkContext, getItems, replaceItems, _setFields } = require('feathers-hooks-common');
const uuidv4 = require('uuid/v4');
// eslint-disable-next-line no-unused-vars
@bravo-kernel
bravo-kernel / feathersjs-swagger.js
Last active November 24, 2020 21:49
Working example of feathers-swagger with the swagger definition in a service (not in app.js)
// -----------------------------------------------------
// projects.service.js
// -----------------------------------------------------
// Initializes the `projects` service on path `/projects`
const createService = require('feathers-sequelize');
const createModel = require('../../models/projects.model');
const hooks = require('./projects.hooks');
module.exports = function (app) {
const Model = createModel(app);
@bravo-kernel
bravo-kernel / default
Created March 10, 2018 08:24
Cakebox Dashboard vhost
# --------------------------------------
# Cakebox HTTP catch-all configuration
# --------------------------------------
server {
listen 80 default_server;
server_name _;
# root directive should be global
root /cakebox/console/webroot;
@bravo-kernel
bravo-kernel / image
Created October 22, 2017 12:02
Geminister
a
@bravo-kernel
bravo-kernel / app.php
Created September 21, 2017 06:29
CakePHP email settings for Google G-Suite, Gmail, Work
GOOD:
Array
(
[host] => ssl://smtp.gmail.com
[port] => 465
[timeout] => 30
[username] => [email protected]
[password] => secret
[client] =>