Skip to content

Instantly share code, notes, and snippets.

View stringparser's full-sized avatar
🏠
Working from home

Javier Carrillo Milla stringparser

🏠
Working from home
View GitHub Profile
@stringparser
stringparser / url.sh
Created September 3, 2016 10:38
find urls in all css files
grep -oh 'url[^)]*' ./**/*.css | grep -o "[/.][^\\'\\\"?#]*"
@stringparser
stringparser / git-extras-plus.sh
Created December 19, 2017 12:35
prune this, grune that
alias grune='git branch --merged | egrep -v "(^\*|master|dev)" | xargs git branch -d'
alias drune='docker rm $(docker ps -aq)'
@stringparser
stringparser / thy-minimal-docs.md
Last active January 19, 2018 10:33
Documentation thoughts for non-library projects

Documentation

Ideas about documenting enough for non-library projects.

Motivation

The aim of this document is to give rules to follow in order to make a project understandable from a producer and consumer point of view. The idea is to have a simple setup where code self-documents itself whenever possible. When this is not possible we will give options on how to go about it.

Where to start?

@stringparser
stringparser / eventListenerList.js
Last active November 6, 2018 16:50
`eventListenerList`
;[Element].forEach(function(self){
self.prototype.eventListenerList = {};
self.prototype._addEventListener = self.prototype.addEventListener;
self.prototype.addEventListener = function(type, handle, useCapture) {
useCapture = useCapture === void 0 ? false : useCapture;
var node = this;
node._addEventListener(type, handle, useCapture);
@stringparser
stringparser / npm-boot.sh
Last active October 19, 2019 07:43
boostrap nested npm modules
# boostrap nested npm modules installation
npm-boot() {
local INIT_DIR=$PWD
# go through all packages and install their dependencies
for package in `ls ./**/package.json | grep -v node_modules`
do
cd $INIT_DIR
cd $(dirname $package)
echo "Installing modules for $PWD"
@stringparser
stringparser / README.md
Last active November 2, 2021 09:43
webpack + typescript + react config #blog
@stringparser
stringparser / stdoutHook.md
Last active April 3, 2022 06:09
node stdout hook with knobs

Inspired on this other gist

function hook(callback){
  
  var oldWrite = process.stdout.write;
  var output = { str : '' };

  return {
    restore : function(){