Skip to content

Instantly share code, notes, and snippets.

View viniciusdiogo's full-sized avatar

Vinicius Diogo de Melo viniciusdiogo

View GitHub Profile
@viniciusdiogo
viniciusdiogo / p4merge4git.md
Created June 12, 2017 20:59 — forked from tony4d/p4merge4git.md
Setup p4merge as a visual diff and merge tool for git
@viniciusdiogo
viniciusdiogo / AEM cURL
Created May 31, 2017 05:34 — forked from joemaffia/AEM cURL
AEM cURL commands
Uninstall a bundle (use http://localhost:4505/system/console/bundles to access the Apache Felix web console)
curl -u admin:admin -daction=uninstall http://localhost:4505/system/console/bundles/"name of bundle"
Install a bundle
curl -u admin:admin -F action=install -F bundlestartlevel=20 -F
bundlefile=@"name of jar.jar" http://localhost:4505/system/console/bundles
Build a bundle
curl -u admin:admin -F bundleHome=/apps/centrica/bundles/name of bundle -F
descriptor=/apps/centrica/bundles/com.centrica.cq.wcm.core-bundle/name_of_bundle.bnd
@viniciusdiogo
viniciusdiogo / fix-limit.sh
Created May 22, 2017 01:32
Mac Limit Open File NodeJs
#!/bin/sh
echo kern.maxfiles=65536 | sudo tee -a /etc/sysctl.conf
echo kern.maxfilesperproc=65536 | sudo tee -a /etc/sysctl.conf
sudo sysctl -w kern.maxfiles=65536
sudo sysctl -w kern.maxfilesperproc=65536
ulimit -n 65536 65536
@viniciusdiogo
viniciusdiogo / gitbranchs.sh
Last active May 8, 2017 19:01
Shows current branch of various projects
#!/bin/bash
# usage: gitbranchs.sh ./projects
# https://unix.stackexchange.com/questions/183361/get-git-branch-from-several-folders-repos
# http://stackoverflow.com/questions/5947742/how-to-change-the-output-color-of-echo-in-linux
red=`tput setaf 1`
green=`tput setaf 2`
reset=`tput sgr0`
# Subshell so we don't end up in a different dir than where we started.
## TAGS ##
#Create tag
git tag <tag name>
#Push all tags
git push --tags
#Delete a local tag
git tag -d <tag name>
#Delete remote tag
git push origin :refs/tags/<tag name>
@viniciusdiogo
viniciusdiogo / migrate_repo.sh
Created December 2, 2016 11:35 — forked from mariozig/migrate_repo.sh
Migrate repo from GitLab to GitHub Full blog post @ http://ruby.zigzo.com/2015/03/23/moving-from-gitlab-to-github/
# Assume we are in your home directory
cd ~/
# Clone the repo from GitLab using the `--mirror` option
$ git clone --mirror git@your-gitlab-site.com:mario/my-repo.git
# Change into newly created repo directory
$ cd ~/my-repo.git
# Push to GitHub using the `--mirror` option. The `--no-verify` option skips any hooks.