Skip to content

Instantly share code, notes, and snippets.

View the-glima's full-sized avatar
🎧
Helping robots to steal all jobs

Gabriel Lima the-glima

🎧
Helping robots to steal all jobs
View GitHub Profile
@the-glima
the-glima / installation-guide.md
Last active March 12, 2021 19:03
My installation OS guide
@the-glima
the-glima / metatags.html
Last active April 4, 2020 02:21 — forked from jaigouk/meta-tags.md
HTML Meta tags collection
<!-- Basic HTML Meta Tags -->
<meta name="keywords" content="your, tags"/>
<meta name="description" content="150 words"/>
<meta name="subject" content="your website's subject">
<meta name="copyright"content="company name">
<meta name="language" content="ES">
<meta name="robots" content="index,follow" />
<meta name="revised" content="Sunday, July 18th, 2010, 5:15 pm" />
<meta name="abstract" content="">
<meta name="topic" content="">
@the-glima
the-glima / prepare-commit-msg.sh
Last active July 17, 2020 15:09 — forked from bartoszmajsak/prepare-commit-msg.sh
Prepend branch name into commit message
#!/bin/bash
FILE=$1
MESSAGE=$(cat $FILE)
TICKET=$(git rev-parse --abbrev-ref HEAD | grep -Eo '^(\w+\/)?(\w+[-_])?[0-9]+' | grep -Eo '(\w+[-])?[0-9]+' | tr "[:lower:]" "[:upper:]")
if [[ $TICKET == "" || "$MESSAGE" == "$TICKET"* ]];then
exit 0;
fi
echo "$TICKET: $MESSAGE" > $FILE
@the-glima
the-glima / mixins.scss
Last active May 29, 2020 07:30
A compilation of custom mixins and functions #website
// Mixins
// -=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
// Breakpoint
// --------------------------------------------
// Usage:
// @include breakpoint (min-width, 300px) {
// div { color:#000; }
// }
@the-glima
the-glima / string.customIndexOf.js
Last active April 4, 2020 02:22
Custom String.prototype.indexOf
// String: Custom Index Of
String.prototype.customIndexOf = function(searchValue, fromIndex) {
var notfound = -1;
// Validating param: fromIndex
// fromIndex needs to be type number and needs to be an integer
if (typeof fromIndex !== 'number' || isNaN(fromIndex)) {
fromIndex = parseInt(fromIndex);
}
@the-glima
the-glima / pr-check.js
Last active April 4, 2020 02:23
Automated checks when creating PRs
// ==UserScript==
// @name Github PR
// @namespace https://github.com/gabrihellmateus/
// @version 0.1
// @description Automate tasks for helping creating PRs
// @author Gabriel Lima (inspired by Doug Bacelar)
// @match https://github.com/gabrihellmateus/mercearia/pull/*
// ==/UserScript==
(function() {
@the-glima
the-glima / multiple_ssh_setting.md
Last active May 24, 2021 03:27 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys GitHub setup

Multiple SSH Keys settings for different github account

create different public key

Make sure you have .ssh folder created:

@the-glima
the-glima / .bash_aliases
Last active April 4, 2021 18:55
[Bash] My bash aliases #website
# ----------------------
# Aliases
# ----------------------
# Terminal
alias .='cd .'
alias ..='cd ..'
alias ...='cd .. && cd ..'
alias ll='ls -alF'
alias la='ls -A'
@the-glima
the-glima / sync-branch.sh
Last active September 24, 2020 14:39
[Git] Sync your current branch with another #website
# Add this to your .bash-aliases
function syncBranch() {
# Get your current branch
local CURRENT_BRANCH=$(git symbolic-ref --short HEAD)
local CURRENT_BRANCH="${CURRENT_BRANCH}"
# If you don't pass any argument it will use the default branch
local BASE_BRANCH="${1:-master}"