# Install Vue CLI, use 'sudo' on MacOS
# see: https://github.com/vuejs/vue-cli
npm install -g vue-cli
# Create project
vue init webpack-simple project-name
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
assert "Found 2" == [1,2,3].findResult { it > 1 ? "Found $it" : null } // Return if not null | |
assert ["Found 2", "Found 3"] == [1,2,3].findResults { it > 1 ? "Found $it" : null } | |
assert 1*1*2*3 == [1,2,3].inject(1) { acc, val -> acc * val } | |
assert [2,4,6] == [1,2,3].collect { it * 2 } | |
assert [2,4] == [1,2,3,4].findAll { it % 2 == 0 } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ------------------------ | |
// Controller classes | |
// ------------------------ | |
package de.beispiel.api | |
import de.beispiel.SuperController | |
import de.beispiel.exception.DomainObjectNotFoundException | |
class CrmProjectController extends SuperController { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- ----------- --> | |
<!-- Index page --> | |
<!-- ----------- --> | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="layout" content="main"/> | |
<parameter name="layout" value="app" /> | |
<parameter name="fixedWidth" value="true" /> | |
<asset:stylesheet src="application"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ------------------------ | |
// Server API | |
// ------------------------ | |
package de.beispiel.api | |
import de.beispiel.SuperController | |
import de.beispiel.crm.CrmProject | |
import de.beispiel.crm.CrmProjectService | |
import grails.converters.JSON |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- -------------------- --> | |
<!-- Index page component --> | |
<!-- -------------------- --> | |
<template> | |
<div> | |
<v-container v-if="$route.name === 'crm/projects'" class="px-0" fluid> | |
<v-layout row wrap> | |
<v-flex> | |
<v-toolbar flat> | |
<v-text-field v-model="search" append-icon="search" label="Search" single-line hide-details></v-text-field> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// --------------------- | |
// Vuex module | |
// --------------------- | |
import Vue from 'vue'; | |
import { com } from "./../../main"; | |
import * as log from 'loglevel'; | |
const state = { | |
projects: {}, | |
currentProjectId: undefined |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Standard select | |
SELECT id, price FROM table_name; | |
-- Check not NULL | |
SELECT id, price FROM table_name WHERE consumer IS NOT NULL; | |
-- Update | |
UPDATE table_name SET price = 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# From https://certbot.eff.org/#ubuntutrusty-apache | |
# | |
cd /usr/local/bin | |
wget https://dl.eff.org/certbot-auto | |
chmod a+x certbot-auto | |
./certbot-auto # Follow instruction |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# All open port with bounded program | |
netstat -tulpn | grep LISTEN | |
# Extract | |
tar -xzf archiv.tar.gz -C /PFAD/ZUM/ORDNER | |
# Create | |
tar -czf archiv.tar.gz |