Skip to content

Instantly share code, notes, and snippets.

View HoverBaum's full-sized avatar
🌳
 I like 🌳🌳🌳 

Hendrik HoverBaum

🌳
 I like 🌳🌳🌳 
View GitHub Profile
@HoverBaum
HoverBaum / ActiveHandles.js
Last active April 12, 2016 02:28
The active handles after trying to close a http server that uses puer connect middleware
[
WriteStream {
_connecting: false,
_hadError: false,
_handle: TTY {
_externalStream: {},
fd: -1,
writeQueueSize: 0,
owner: [Circular],
onread: [Function: onread]
@HoverBaum
HoverBaum / Documenting JavaScript.md
Last active May 3, 2016 06:35
My way of documenting JavaScript code.

Goals:

  • Have code documented in the code
  • Automatically generate a documentation website/readme

JSDoc

The most wildly used standard for documenting JavaSCript is JSDoc.

JSDOC uses @tags in comment blocks that start with /**. So to specify a parameter which should be a string you do something like:

@HoverBaum
HoverBaum / Pen & Paper.md
Created May 3, 2016 07:46
Dinge, die mich fuer Pen & Paper begeistern.

Pen & Paper

Inspiration and motivation for Pen and Paper games.

Gamers

Eine Gruppe von Rollenspielern erlebet Abenteuer mit einem PnP Spiel. Dabei passiert alles, wieso wir PnP so leiben, Hosen werden geklaut und große Gefahren gemeistert.

Document ALL the things

Inspired by the question if and how devdocs.io could add have a feature to add customs docs (see issue 295). I am beginning to wonder about the best way to create a System which centralizes all documentations you need for your work.

The end product

Should fulfill certain criteria:

  • You can add your own documentation of in-house applications
  • All documentations look the same
  • That is to say the system is coherent in itself
@HoverBaum
HoverBaum / React with Webpack.md
Last active May 24, 2016 02:18
Webpack setup for React projects

Developing react based applications using webpack

Since this just took me a day to get to work. Let me tell you how I did it.

My filestructure for this looks like this:

.
├── package.json
├── src
│   ├── js
@HoverBaum
HoverBaum / Testing JavaScript.md
Last active May 24, 2016 09:26
How I go about testing JavaScript.

Everything should be tested. Well everythings that is more than playing around. Tests make your code better, more reliable and help find bugs. Though tests do add a massive overhead to changing your code. And quite honestly I have probably spend more time writing tests then code that they test. But in the end it was always worth it because they find bugs and tell me what I can rely on to work.

Tape

I like the "KISS" princliple, not just because of its name, so let us keep it simple stupid (and yes I just researched wether or not to put a comma there).

A lot of testing Frameworks out there introduce a lot of overhead and semantics to your code.

@HoverBaum
HoverBaum / ICEProject Standard.md
Last active May 31, 2016 01:44
Thinking about a coding standard for iceproject.

I.C.E. Project

This document strives to provide coding guidelines and standard to use in the iceproject.

At the same time it serves as the "must read" introduction for people new to the project.

General Filestructure

.
@HoverBaum
HoverBaum / hideScrollbar.less
Created June 1, 2016 01:42
Atom: hide scrollbars
/*
Hide scrollbars when not hovering container in Atom.
For Windows especially.
Get those scrollbars out of your way.
Put this in your 'style.less'.
Open Settings click 'Open config folder'
This was really getting to me, thanks for
@HoverBaum
HoverBaum / modular-headers.styl
Created June 23, 2016 01:43
Calculate modular scalled font-sizes for headlines in Stylus
/*
Calculate modular scalled font-sizes for headlines in Stylus
"Modular scale refers to a series of harmonious numbers
that relate to one another in a meaningful way."
Inspired after reading http://typographyhandbook.com/#font-sizing
Build after http://www.modularscale.com/
*/
@HoverBaum
HoverBaum / JSSyntax.js
Last active June 23, 2016 06:51
An example of JavaScript syntax for code highlighters.
/*
This file is build to have somehting to paste into code highlighters or editors and see how they display JavaScript.
It therefor includes many random things you might do in JS.
*/
function hello() {
var hello = 'hello'
let world = "world"
const helloWorld = hello + ` ${world}`
return(helloWorld)