Skip to content

Instantly share code, notes, and snippets.

View kanngard's full-sized avatar

Johan Känngård kanngard

View GitHub Profile
@kanngard
kanngard / Bash project
Last active November 19, 2025 12:25 — forked from sarvsav/Bash project
Bash project directory structure
├── bin => Contains binary of your project
├── docs => Contains documentation and future aspects about your project
│ └── ToDo => ToDo List of your project
├── CONTRIBUTING.md => Contains information how to contribute code, bugs, documentation etc.
├── etc => Add configuration files under this directory
│ └── imdb-xplorer.cfg => Configuration file
├── LICENSE => Add license for your project
├── logs => This directory contains logs about behaviour of your script
│ └── imdb-xplorer.log => log file
├── README.md => Contains how to install, and use your project
@kanngard
kanngard / console-polyfill.js
Last active August 29, 2015 14:01 — forked from sillero/gist:4345292
Safe JavaScript console polyfill, JSHint mods
/**
* Console-polyfill. MIT license.
* Modified from https://github.com/paulmillr/console-polyfill
* Make it safe to do console.log() always.
*/
(function(con) {
var dummy = con.log || function() {}
for (var methods = "assert,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profileEnd,time,timeEnd,trace,warn".split(","), func;
(func = methods.pop()) !== undefined;) {
con[func] = con[func] || dummy;