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 / Dev Setup.md
Last active February 20, 2017 13:21
How i am set up for JS development

JS dev setup

This gist includes files detailing programs and tools I personally am using for frontend and mainly JavaScript development.

Atom

To edit all my JS, HTML and CSS files I use Atom. You can get it at atom.io. It is an open source HTML and JS based editor running on electron. So you can do a lot of configuration and hacking around.

Usage

@HoverBaum
HoverBaum / .gitlab-ci.yml
Created May 20, 2016 09:12
Gulpfile and gitlab CI config to go with my Hexo based blog.
image: node:4.2.2
pages:
cache:
paths:
- node_modules/
script:
- npm install -g gulp
- npm install
@HoverBaum
HoverBaum / bestCommentEver.js
Last active August 25, 2016 02:06
Ever write utterly horrible code? Put this at the top!
/*
, ,
/ \/ \
(/ //_ \_
.-._ \|| . \
\ '-._ _,:__.-"/---\_ \
______/___ '. .--------------------'~-'--.)__( , )\ \
`'--.___ _\ / | Here ,' \)|\ `\|
/_.-' _\ \ _:,_ Be Dragons " || (
.'__ _.' \'-/,`-~` |/
@HoverBaum
HoverBaum / loggingMiddleware.js
Created July 20, 2016 02:40
Logging middleware for Redux.
/*
Logging middleware for Redux as suggested by the official documentation.
http://redux.js.org/docs/advanced/Middleware.html
*/
export const logger = store => next => action => {
console.log('dispatching\n', action)
let result = next(action)
console.log('next state\n', store.getState())
return result
@HoverBaum
HoverBaum / webpack.config.js
Created July 19, 2016 07:43
Basic webpack file for ReactJS based proejcts.
const path = require('path')
const webpack = require('webpack')
module.exports = {
entry: {
main: "./src/js/index.js"
},
output: {
path: path.join(__dirname, 'build', 'js'),
filename: "[name].js"
@HoverBaum
HoverBaum / Public domain images.md
Last active July 18, 2016 14:51
A currated list of websites with public domain images.

public domain images

Landscape A curated list of public domain image resources.

My favourite

unsplash.com

General image collections

@HoverBaum
HoverBaum / findFiles.js
Created July 4, 2016 02:22
Asynchronously find all files matching a filter in a directory using node.
/**
* Walks a filestructure starting from a given root and returns all found files to a callback, using a filter.
* @param {String} dir - Root directory
* @param {RegEx} filter - RegEx to test found files against
* @param {Function} done - Callback will be called with (err, foundFiles)
* @private
*/
function walk(dir, filter, done) {
var results = [];
fs.readdir(dir, function(err, list) {
@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)
@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 / 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