Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home forever and ever

Max Claus Nunes maxcnunes

🏠
Working from home forever and ever
View GitHub Profile
@maxcnunes
maxcnunes / remove-node_module-recursively-1.sh
Last active Jan 25, 2017
Remove all node_module folders recursively. Useful to free up disk space by removing the node_module from those projects you have not used for a while.
View remove-node_module-recursively-1.sh
# Simple version using only "find"
find . -name "node_modules" -type d -prune -exec rm -rf '{}' +
@alekseykulikov
alekseykulikov / index.md
Last active Aug 8, 2020
Principles we use to write CSS for modern browsers
View index.md

Recently CSS has got a lot of negativity. But I would like to defend it and show, that with good naming convention CSS works pretty well.

My 3 developers team has just developed React.js application with 7668 lines of CSS (and just 2 !important). During one year of development we had 0 issues with CSS. No refactoring typos, no style leaks, no performance problems, possibly, it is the most stable part of our application.

Here are main principles we use to write CSS for modern (IE11+) browsers:

View Readme.md

Minimum Viable Async with Node 6

With the release of Node 6.0.0, the surface of code that needs transpilation to use ES6 features has been reduced very dramatically.

This is what my current workflow looks like to set up a minimalistic and fast microservice using micro and async + await.

The promise

@cantidio
cantidio / github-api.md
Last active Apr 13, 2018
github api commit creation
View github-api.md
@DarrenN
DarrenN / get-npm-package-version
Last active Nov 26, 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
@yvele
yvele / get-npm-package-version
Last active Oct 30, 2020
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' \
| tr -d '[[:space:]]')
echo $PACKAGE_VERSION
@nmerouze
nmerouze / main.go
Last active Aug 27, 2020
JSON-API with Go and MongoDB: Final Part
View main.go
package main
import (
"encoding/json"
"log"
"net/http"
"reflect"
"time"
"github.com/gorilla/context"
@arqex
arqex / styles.less
Last active Sep 17, 2017
Atom compact styles
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
*
* To apply this styles to your editor click on
@anildigital
anildigital / gist:862675ec1b7bccabc311
Created Jul 26, 2014
Remove dangling docker images
View gist:862675ec1b7bccabc311
docker rmi $(docker images -q -f dangling=true)
View git-reset-guide.md

When you modify a file in your repository, the change is initially unstaged. In order to commit it, you must stage it—that is, add it to the index—using git add. When you make a commit, the changes that are committed are those that have been added to the index.

git reset changes, at minimum, where your current branch is pointing. The difference between --mixed and --soft is whether or not your index is also modified. So, if we're on branch master with this series of commits:

- A - B - C (master)

HEADpoints to C and the index matches C.

--soft

You can’t perform that action at this time.