Skip to content

Instantly share code, notes, and snippets.

View urbansky's full-sized avatar

Stefan Urbansky urbansky

View GitHub Profile
@urbansky
urbansky / docker.sh
Last active June 1, 2021 05:52
Docker common commands
# ---------------------------------------------------------
# docker file -> text file with commands to create an image
# images -> a read-only memory dump
# container -> running or stopped image with working data
# ---------------------------------------------------------
# see also: https://github.com/wsargent/docker-cheat-sheet
# List all running docker containers
docker ps
@urbansky
urbansky / commands
Last active May 8, 2020 12:10
Misc linux commands
# 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
@urbansky
urbansky / letsencrypt.sh
Last active January 10, 2019 07:24
Let's encrypt for Ubuntu 14.04 on Apache
#
# 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
@urbansky
urbansky / common.sql
Last active January 3, 2019 14:57
Most commonly used MySQL commands
-- 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;
// ---------------------
// Vuex module
// ---------------------
import Vue from 'vue';
import { com } from "./../../main";
import * as log from 'loglevel';
const state = {
projects: {},
currentProjectId: undefined
<!-- -------------------- -->
<!-- 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>
// ------------------------
// Server API
// ------------------------
package de.beispiel.api
import de.beispiel.SuperController
import de.beispiel.crm.CrmProject
import de.beispiel.crm.CrmProjectService
import grails.converters.JSON
<!-- ----------- -->
<!-- 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"/>
// ------------------------
// Controller classes
// ------------------------
package de.beispiel.api
import de.beispiel.SuperController
import de.beispiel.exception.DomainObjectNotFoundException
class CrmProjectController extends SuperController {
@urbansky
urbansky / vuejs.md
Last active March 28, 2018 06:39
Vue JS - Overview

Manage project

# 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