Skip to content

Instantly share code, notes, and snippets.

View imarcelolz's full-sized avatar
😃

Marcelo Zaniolo imarcelolz

😃
View GitHub Profile
@imarcelolz
imarcelolz / git-temporary-ignore.md
Created June 5, 2020 10:33 — forked from sloanlance/git-temporary-ignore.md
git: A couple ways to temporarily ignore changed or new files without altering .gitignore.

There are times notifications aren't wanted about either a changed repo file or a new file that needs to be added to the repo. However, adding the name of the file to .gitignore might not be a good option, either. For example, locally-generated files that other users aren't likely to generate (e.g., files created by an editor) or files of experimental test code might not be appropriate to appear in a .gitignore file.

In those cases, use one of these solutions:

  1. If the file is a changed repo file

    Use the command:

    git update-index --assume-unchanged "$FILE"

https://github.com/americanexpress/react-albus
https://github.com/americanexpress/parrot
https://www.unmock.io/docs/openapi
https://blog.sapegin.me/all/react-testing-1-best-practices/
https://github.com/TheBrainFamily/wait-for-expect
https://evilmartians.com/chronicles
https://robotframework.org/
https://www.keycloak.org/getting-started/getting-started-docker
@imarcelolz
imarcelolz / All Your Pull request.md
Created April 22, 2020 07:41 — forked from liuggio/All Your Pull request.md
Your Pull Request timeline

In order to obtain all your Open source Pull-Request history:

  1. Go to Google bigquery and execute the following query replacing liuggio with your GitHub login

  2. execute query

SELECT repository_url, repository_owner, repository_name, count(*) as numberOfPR
FROM [githubarchive:github.timeline]
WHERE payload_pull_request_head_repo_owner_login = "liuggio"
@imarcelolz
imarcelolz / prepare-commit-msg.sh
Created February 28, 2020 12:12 — forked from bartoszmajsak/prepare-commit-msg.sh
How to automatically prepend git commit with a branch name
#!/bin/bash
# This way you can customize which branches should be skipped when
# prepending commit message.
if [ -z "$BRANCHES_TO_SKIP" ]; then
BRANCHES_TO_SKIP=(master develop test)
fi
BRANCH_NAME=$(git symbolic-ref --short HEAD)
BRANCH_NAME="${BRANCH_NAME##*/}"
@imarcelolz
imarcelolz / lodash-node-templateSettings
Created February 26, 2020 12:28 — forked from niccai/lodash-node-templateSettings
Changing lodash/underscore template settings in Node.js to use Mustache style braces
// Client side, you typically see the template style changed to {{ }} like so...
_.templateSettings = {
interpolate : /\{\{(.+?)\}\}/gim,
evaluate: /\{\#(.+?)\#\}/gim
};
/*
However, in Node.js, this causes issues when trying to render a template.
Likely, you haven't paid too much attention to the fact that you are setting
@imarcelolz
imarcelolz / fix osx node-gyp install
Last active February 13, 2020 15:24
fix osx node-gyp install
sudo rm -rf /Library/Developer/CommandLineTools
xcode-select --install
watchman-make -p '**/*.rb' --run=./bin/rspec
@imarcelolz
imarcelolz / docker-cleanup.sh
Last active December 13, 2019 13:11
Docker Cleanup
#!/usr/bin/env sh
docker system prune
docker system prune -a
docker rmi $(docker images -a -q)
docker rm $(docker ps -a -f status=exited -q)
@imarcelolz
imarcelolz / fix-wordpress-permissions.sh
Created April 3, 2017 00:07 — forked from Adirael/fix-wordpress-permissions.sh
Fix wordpress file permissions
#!/bin/bash
#
# This script configures WordPress file permissions based on recommendations
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions
#
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org>
#
WP_OWNER=www-data # <-- wordpress owner
WP_GROUP=www-data # <-- wordpress group
WP_ROOT=$1 # <-- wordpress root directory
@imarcelolz
imarcelolz / rails.bash
Created April 2, 2017 18:05
NosqlBA - 2017 - Script para ambiente Rails no Ubuntu 16.04
#!/bin/bash
sudo apt update
sudo apt dist-upgrade -y
# server tools
sudo apt -y install git nodejs
# Ruby dependencies
sudo apt -y build-dep ruby