Skip to content

Instantly share code, notes, and snippets.

View mischah's full-sized avatar
:octocat:
afk // brb

Michael Kühnel mischah

:octocat:
afk // brb
View GitHub Profile
# Put this in your .zshrc or .bashrc file
# Install `tree` first — brew install tree
function t() {
# Defaults to 3 levels deep, do more with `t 5` or `t 1`
# pass additional args after
tree -I '.git|node_modules|bower_components|.DS_Store' --dirsfirst --filelimit 15 -L ${1:-3} -aC $2
}

Hello!

You've published a series of packages that depend on all packages in the npm registry, probably using this program: https://github.com/Ell/npm-gen-all

We’re not entirely sure what your motivations are for creating this series of packages, but we have some concerns.

First, these packages violate npm's Terms of Use. Much like a squatter package, these have no individual functionality beyond depending on other packages. As a result, we intend to remove them from the registry this afternoon.

It seems that these series of packages might be a response to the events of last week and recent changes to our unpublish policy. A few community members are concerned that series of packages like the ones you’ve created will make unpublishing packages completely impossible after the 24 hour window. This is not the case. These series of packages are not valid package dependents because they violate th

var chai = require('chai');
var expect = chai.expect;
var sinon = require('sinon');
var sinonChai = require('sinon-chai');
chai.use(sinonChai);
var eventBus = (function () {
var _eventHandler = null;
@krnlde
krnlde / makepdf.es6.js
Last active August 29, 2015 14:23
This script handles HTTP POST requests and returns a generated, streamed PDF filled with the contents of the POST. You need to install wkhtmltopdf globally on your system first. You can either provide form data key value pairs or JSON data. It'll both be parsed to JSON and put into handlebars. Install all the imports via npm.
"use strict";
import fs from 'fs';
import express from 'express';
import bodyParser from 'body-parser';
import Handlebars from 'handlebars';
import wkhtmltopdf from 'wkhtmltopdf';
const app = express();
app.use(bodyParser.json());
@yoavniran
yoavniran / ultimate-ut-cheat-sheet.md
Last active July 16, 2025 06:32
The Ultimate Unit Testing Cheat-sheet For Mocha, Chai, Sinon, and Jest
@paulirish
paulirish / bling.js
Last active September 13, 2025 12:13
bling dot js
/* bling.js */
window.$ = document.querySelector.bind(document);
window.$$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function(name, fn) { this.addEventListener(name, fn); };
NodeList.prototype.__proto__ = Array.prototype;
NodeList.prototype.on = function(name, fn) { this.forEach((elem) => elem.on(name, fn)); };
@anthonyholmes
anthonyholmes / bootstrap-sass-mixin-cheatsheet.scss
Created October 10, 2014 08:13
Bootstrap Sass Mixin Cheatsheet
// Alerts
@include alert-variant($background, $border, $text-color);
// Background Variant
@include bg-variant($parent, $color);
// Border Radius
@include border-top-radius($radius);
@include border-right-radius($radius);
@include border-bottom-radius($radius);
@benedfit
benedfit / _critical.scss
Last active November 25, 2021 12:36
Critical CSS using Sass and Jekyll
$critical-css-only:true !default;
@mixin critical($critical-only:true){
@if (($critical-css-only and $critical-only) or (not $critical-css-only and not $critical-only)){
@content;
}
}
@hdragomir
hdragomir / sm-annotated.html
Last active February 2, 2025 02:22
The deferred font loading logic for Smashing Magazine. http://www.smashingmagazine.com/
<script type="text/javascript">
(function () {
"use strict";
// once cached, the css file is stored on the client forever unless
// the URL below is changed. Any change will invalidate the cache
var css_href = './index_files/web-fonts.css';
// a simple event handler wrapper
function on(el, ev, callback) {
if (el.addEventListener) {
el.addEventListener(ev, callback, false);
@bastianallgeier
bastianallgeier / kirby2.md
Last active March 8, 2025 14:49
An overview of changes and new features for Kirby 2 – Toolkit, CMS and Panel (work in progress)

I've moved this doc to: