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 January 25, 2017 17:24
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 December 26, 2022 17:31
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

@mcarrowd
mcarrowd / main.go
Last active September 23, 2021 17:56
golang win1251 <-> utf8 encoding issue demonstration
View main.go
package main
import (
"fmt"
"golang.org/x/text/encoding/charmap"
)
func main() {
for i := 0; i <= 255; i++ {
charnum := uint8(i)
@cantidio
cantidio / github-api.md
Last active April 13, 2018 21:19
github api commit creation
View github-api.md
@DarrenN
DarrenN / get-npm-package-version
Last active February 6, 2023 13:50 — 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 January 23, 2023 13:44
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 March 2, 2022 16:36
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 September 17, 2017 15:56
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 July 26, 2014 18:27
Remove dangling docker images
View gist:862675ec1b7bccabc311
docker rmi $(docker images -q -f dangling=true)