Skip to content

Instantly share code, notes, and snippets.

View darosh's full-sized avatar
🏠
Working from home.

Jan Forst darosh

🏠
Working from home.
View GitHub Profile

Good or Evil?

  • Poor API specfification is ....
  • Generating/Doing useless/counterproductive work is ....
  • Micromanaging developers into brainwashed zombies is ....

Visual Studio Code extensions

List

code --list-extensions | xargs -L 1 echo code --install-extension

Theme

@darosh
darosh / clean_code.md
Created September 25, 2018 17:59 — forked from wojteklu/clean_code.md
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

const fs = require('fs')
const path = require('path')
const yaml = require('js-yaml')
const knownCategories = yaml.load(fs.readFileSync('./resources/categories.yaml', 'utf8'))
const TITLE = 0
const DOMAIN = 1
const PRODUCT = 2
const OLD = 3
APIs Discovery Service googleapis.com discovery developer_tools
DLP googleapis.com dlp cloud
Google Cloud DNS googleapis.com dns cloud
DoubleClick Bid Manager googleapis.com doubleclickbidmanager marketing
DoubleClick Search googleapis.com doubleclicksearch marketing
Firebase Dynamic Links googleapis.com firebasedynamiclinks backend
Firebase Remote Config googleapis.com firebaseremoteconfig backend
Firebase Rules googleapis.com firebaserules backend
Google Cloud Firestore googleapis.com firestore backend
Fitness googleapis.com fitness other
@darosh
darosh / categories.tab
Created October 3, 2017 14:43
openapi-directory categories patch file for patch script
6-dot-authentiqio.appspot.com security
apacta.com time_management, project_management
apitore.com documentFrequencyApis text
apitore.com languageDetectionApis text
apitore.com sentencepieceApis_tweet_ text
apitore.com sentencepieceApis_wikipedia_ text
apitore.com sentenceSeparatorApis text
apitore.com sentenceSimilarity text
apitore.com sentimentApis text
apitore.com synonymApis text
@darosh
darosh / categories.js
Created October 3, 2017 14:42
Patching script for openapi-directory
const fs = require('fs')
const path = require('path')
const yaml = require('js-yaml')
// loads and parses tab delimited file 'categories.tab'
readFileAsync(path.join(__dirname, 'categories.tab')).then(data => {
const records = data.trim()
.split('\n').map(line =>
line.split('\t').map((cell, index) =>
index > 1
@darosh
darosh / README.md
Last active May 23, 2016 17:41
Swagger API Relations

This works probably only for blueprint/entity based APIs like loopback.io.

angular.module("materialCalendar", ["ngMaterial", "ngSanitize"]);
angular.module("materialCalendar").constant("materialCalendar.config", {
version: "0.2.13",
debug: document.domain.indexOf("localhost") > -1
});
angular.module("materialCalendar").config(["materialCalendar.config", "$logProvider", "$compileProvider", function (config, $logProvider, $compileProvider) {
if (config.debug) {
$logProvider.debugEnabled(false);