Skip to content

Instantly share code, notes, and snippets.

Avatar
😧
I’d like to speak to 2020’s manager

Florian Wendelborn FlorianWendelborn

😧
I’d like to speak to 2020’s manager
View GitHub Profile
@kingdaro
kingdaro / auto-resize-tree-view.less
Created Mar 24, 2017
Styles for an automatically resizing tree-view
View auto-resize-tree-view.less
.tree-view-resizer {
width: max-content;
}
// hide the resize handle so we don't accidentally break things
.tree-view-resize-handle {
display: none;
}
// add some padding for breathing room (optional)
@kanaka
kanaka / addTwo.wast
Last active Apr 11, 2020
Run wast (WebAssembly) in node
View addTwo.wast
(module
(func $addTwo (param i32 i32) (result i32)
(i32.add
(get_local 0)
(get_local 1)))
(export "addTwo" (func $addTwo)))
@hnry
hnry / catch-all-middleware.js
Created Feb 1, 2017
catch all unhandled errors or bad responses
View catch-all-middleware.js
const spirit = require("spirit").node
const catchall = (handler) => (request) => handler(request).then((resp) => {
// something beforehand gave a bad response
// set our own custom message
if (!spirit.is_response(resp)) {
return { status: 500, headers: {}, body: "generic error message because of bad response" }
}
return resp
// something beforehand threw an error
@Restuta
Restuta / framework-sizes.md
Last active Aug 8, 2020
Sizes of JS frameworks, just minified + minified and gzipped, (React, Angular 2, Vue, Ember)
View framework-sizes.md

Below is the list of modern JS frameworks and almost frameworks – React, Vue, Angular, Ember and others.

All files were downloaded from https://cdnjs.com and named accordingly. Output from ls command is stripped out (irrelevant stuff)

As-is (minified)

$ ls -lhS
566K Jan  4 22:03 angular2.min.js
@DarrenN
DarrenN / get-npm-package-version
Last active Aug 15, 2020 — forked from yvele/get-npm-package-version
Extract version from package.json (NPM) using bash / shell
View get-npm-package-version
# Version key/value should be on his own line
PACKAGE_VERSION=$(cat package.json \
| grep version \
| head -1 \
| awk -F: '{ print $2 }' \
| sed 's/[",]//g')
echo $PACKAGE_VERSION
@trey
trey / git-commit-author-rewrite.md
Last active Jun 22, 2020
Change the email address for a git commit.
View git-commit-author-rewrite.md

Change the email address for a git commit.

$ git commit --amend --author="Author Name <email@address.com>"

or

$ git commit --amend --reset-author
@alairock
alairock / styles.less
Last active Oct 3, 2019
Atom.io custom styling.
View styles.less
/*
* Your Stylesheet
*
* This stylesheet is loaded when Atom starts up and is reloaded automatically
* when it is changed.
*
* If you are unfamiliar with LESS, you can read more about it here:
* http://www.lesscss.org
*/
@namuol
namuol / INSTALL.md
Last active Mar 24, 2020
rage-quit support for bash
View INSTALL.md

rage-quit support for bash

HOW TO INSTALL

Put flip somewhere in your $PATH and chmod a+x it.

Copy fuck into ~/.bashrc.

@datagrok
datagrok / ergodox.md
Last active Jan 14, 2019
Reflections on my ErgoDox keyboard
View ergodox.md
@digitaljhelms
digitaljhelms / post-rewrite
Last active Jan 4, 2017
Git hook to call `bower install` and `npm install` automatically.
View post-rewrite
#!/bin/sh
echo "[post-rewrite hook: $1]"
# by noahgrant & digitaljhelms
#
# quick script to call "bower install" and "npm install" automatically if
# bower.json or package.json are changed, respectively
#
# this assumes one top-level file for each
You can’t perform that action at this time.