Skip to content

Instantly share code, notes, and snippets.

View jhnns's full-sized avatar
🧀
When in doubt add cheese!

Johannes Ewald jhnns

🧀
When in doubt add cheese!
View GitHub Profile
@jhnns
jhnns / index.json
Last active May 26, 2020 03:10
Most popular web repositories with at least 10.000 stars. Compiled in May 2017 with https://github.com/jhnns/popular-javascript-projects. The list of repo types can be found at https://gist.github.com/jhnns/d233e88b40f5a2993c240847ccef4ee3.
[
{
"name": "freeCodeCamp/freeCodeCamp",
"description": "The https://freeCodeCamp.com open source codebase and curriculum. Learn to code and help nonprofits.",
"stars": 266038,
"type": "other"
},
{
"name": "twbs/bootstrap",
"description": "The most popular HTML, CSS, and JavaScript framework for developing responsive, mobile first projects on the web.",
@jhnns
jhnns / fragment.md
Created April 25, 2017 15:34
Introducing `<fragment>` element

Introducing <fragment> element

The problem

Web pages are often built of several high-level building blocks, like <Navigation>, <Content>, <Aside> and <Footer>. A typical web page looks roughly like this:

<html>
	<head>
 
@jhnns
jhnns / DuplicateDependenciesError.js
Created February 1, 2017 14:58
Duplicate Dependencies Webpack Plugin
class DuplicateDependenciesError extends Error {
constructor(duplicateDependencies) {
super();
Error.captureStackTrace(this, DuplicateDependenciesError);
const messages = duplicateDependencies.map(helpfulErrorMessage);
const dedupedMessages = dedupeMessages({})(messages);
this.name = "DuplicateDependenciesError";
this.message = "compilation\nDuplicate dependencies found:\n" + dedupedMessages.join("\n");
test
@jhnns
jhnns / bundle.js
Created November 30, 2016 22:13
Simple webpack 2 bundle (containing ES2015 modules)
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;
@jhnns
jhnns / gpg.md
Created November 4, 2016 16:17 — forked from LauLaman/gpg.md
Use GPG to sign commits using git & PHPStorm

1 - install GPG tools : https://gpgtools.org/

2 - Create new key for your github email

3 - Add key to git on your local machine: git config --global user.signingkey YOURKEY

4 - configure git to sign all commits: git config --global commit.gpgsign true

5 - add to the bottom of ~/.gnupg/gpg.conf:

npm run build

commented webpack.optimize.UglifyJsPlugin

build/static/app/css/styles.css

._1gwPWr77dmf4i5iRBt9FXY {
  border-color: #1abc9c !important; }
@jhnns
jhnns / idea.md
Created February 19, 2016 14:56
angular 1 babel plugin idea

angular 1 babel plugin idea

Mitigates angular module boilerplate with ES2015 modules based on naming conventions:

import template from "./modal.html";
import UserService from "./UserService";
import AnotherService from "./AnotherService";

function ModalDirective() {
var phridge = require('phridge');
var simpleLogScript = require.resolve('./simpleLogScript.js');
var phantomInstances = {};
function spawnPhantom(id) {
return phridge.spawn()
.then(function (phantom) {
phantomInstances[id] = phantom;
@jhnns
jhnns / in.css
Created February 2, 2016 16:31
postcss-merge-rules bug (see https://github.com/ben-eb/postcss-merge-rules/issues/14) with `cssnano v3.4.0 (cli v1.0.3)`
.a {
font-family: Arial;
font-family: Helvetica;
}
.b {
font-family: Arial;
}