Skip to content

Instantly share code, notes, and snippets.

View fabricionaweb's full-sized avatar
👊

Fabricio Silva fabricionaweb

👊
View GitHub Profile
# lazyload nvm
# all props goes to http://broken-by.me/lazy-load-nvm/
# grabbed from reddit @ https://www.reddit.com/r/node/comments/4tg5jg/lazy_load_nvm_for_faster_shell_start/
lazynvm() {
unset -f nvm node npm
export NVM_DIR=~/.nvm
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
}
##
# Creates an alias called "git hist" that outputs a nicely formatted git log.
# Usage is just like "git log"
# Examples:
# git hist
# git hist -5
# git hist <branch_name>
# git hist <tag_name> -10
##
git config --global alias.hist "log --pretty=format:'%C(yellow)[%ad]%C(reset) %C(green)[%h]%C(reset) | %C(red)%s %C(bold red){{%an}}%C(reset) %C(blue)%d%C(reset)' --graph --date=short"
@fabricionaweb
fabricionaweb / docker-compose.yml
Created September 2, 2016 13:21 — forked from hernandev/docker-compose.yml
Vue Docker Compose
version: '2'
services:
# Web server - For live reload and development
# This environment can be used to run npm and node
# commands as well
dev:
image: ambientum/node:6
command: node build/dev-server.js
volumes:
@fabricionaweb
fabricionaweb / invite_to_slack.js
Created September 5, 2016 14:58 — forked from dommmel/invite_to_slack.js
Zapier Code to auto invite users to slack
var slackTeam = "YOUR_SLACK_TEAM_NAME ";
var token = 'YOUR_ADMIN_TEST_TOKEN';
// A test token will suffice.
// You can generate one at https://api.slack.com/docs/oauth-test-tokens
// Just make sure that the user issuing the test token is an admin.
var url = 'https://'+ slackTeam + '.slack.com/api/users.admin.invite';
fetch(url, {
method: 'POST',
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
@fabricionaweb
fabricionaweb / .gitignore
Last active October 25, 2017 14:56 — forked from octocat/.gitignore
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Runtime data #

This is an variation of BEM/SUIT/RSCSS methodologies.

Utilities

You will not always need utility classes, but if you want to use then, do in this way.

Syntax: u-<utilityName>

.u-utilityName {}
@fabricionaweb
fabricionaweb / README.md
Created March 2, 2018 22:03 — forked from marcofugaro/README.md
Paste this in the console of your github profile page and start drawing on your contributions!

Made to work along with gitfiti, you can draw with this tool and then export the data and use it with gitfiti.

##Usage

  1. Paste the code in the console of any github profile page which has the contributions graph
  2. Start drawing! Left click to increment the color, right click to clear the cell, clear button to clear everything! Dragging also works!
  3. Once you're happy you can export the data by typing ContributionsDraw.export() into the console.
  4. Or if you want you can also import existing data with ContributionsDraw.import([...])

NOTE: This is developed for and tested in Chrome, other browsers might not support yet some ES6 stuff, you might need to compile it to ES5.

@fabricionaweb
fabricionaweb / deletelocalbranches.sh
Created November 13, 2019 15:40 — forked from moiseshilario/deletelocalbranches.sh
Delete local branches (git)
# Delete branches that are already merged (but master/development/stage)
git branch --merged | egrep -v "(^\*|master|development|stage)" | xargs git branch -d
# Delete all local branches (but master/development/stage)
git branch | egrep -v "(^\*|master|development|stage)" | xargs git branch -D
FROM mhart/alpine-node:10 AS builder
WORKDIR /app
COPY package.json .
RUN yarn install
COPY . .
RUN yarn build && yarn --production
FROM mhart/alpine-node:10
WORKDIR /app
COPY --from=builder /app .
@fabricionaweb
fabricionaweb / webcrypto-examples.md
Created July 31, 2022 17:00 — forked from pedrouid/webcrypto-examples.md
Web Cryptography API Examples