Skip to content

Instantly share code, notes, and snippets.

🍍
One day I'll finish a personal project.

Gabriel Lima the-glima

🍍
One day I'll finish a personal project.
Block or report user

Report or block the-glima

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View commit-message-guidelines.md

Commit Message Guidelines

Short (72 chars or less) summary

More detailed explanatory text. Wrap it to 72 characters. The blank
line separating the summary from the body is critical (unless you omit
the body entirely).

Write your commit message in the imperative: "Fix bug" and not "Fixed
bug" or "Fixes bug." This convention matches up with commit messages
@the-glima
the-glima / multiple_ssh_setting.md
Created Jul 19, 2019 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts
View multiple_ssh_setting.md

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@the-glima
the-glima / string-utils.js
Created Apr 8, 2019 — forked from jonlabelle/string-utils.js
Useful collection of JavaScript string utilities.
View string-utils.js
// String utils
//
// resources:
// -- mout, https://github.com/mout/mout/tree/master/src/string
/**
* "Safer" String.toLowerCase()
*/
function lowerCase(str){
return str.toLowerCase();
@the-glima
the-glima / archive.html
Created Sep 9, 2018 — forked from tuananh/archive.html
Group posts by month in Jekyll archive page
View archive.html
---
layout: default
title: Archive
---
<div class="post">
<h2>Archive</h2>
<ul>
{% for post in site.posts %}
{% unless post.next %}
@the-glima
the-glima / list-categories-count.liquid
Created Sep 9, 2018 — forked from Phlow/list-categories-count.liquid
Jekyll: List all categories with according post count and show and link all post items listed in the according category
View list-categories-count.liquid
<h2>Categories</h2>
<ul>
{% assign categories_list = site.categories %}
{% if categories_list.first[0] == null %}
{% for category in categories_list %}
<li><a href="#{{ category }}">{{ category | capitalize }} ({{ site.tags[category].size }})</a></li>
{% endfor %}
{% else %}
{% for category in categories_list %}
<li><a href="#{{ category[0] | downcase }}">{{ category[0] | capitalize }} ({{ category[1].size }})</a></li>
View credit-card-regex.md

Credit Card Regex

  • Amex Card: ^3[47][0-9]{13}$
  • BCGlobal: ^(6541|6556)[0-9]{12}$
  • Carte Blanche Card: ^389[0-9]{11}$
  • Diners Club Card: ^3(?:0[0-5]|[68][0-9])[0-9]{11}$
  • Discover Card: ^65[4-9][0-9]{13}|64[4-9][0-9]{13}|6011[0-9]{12}|(622(?:12[6-9]|1[3-9][0-9]|[2-8][0-9][0-9]|9[01][0-9]|92[0-5])[0-9]{10})$
  • Insta Payment Card: ^63[7-9][0-9]{13}$
  • JCB Card: ^(?:2131|1800|35\d{3})\d{11}$
  • KoreanLocalCard: ^9[0-9]{15}$
View prepare-commit-msg.sh
#!/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##*/}"
View meta-tags.md

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

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">
View konami.js
function(){
//Konami magic
var code=[38,38,40,40,37,39,37,39,66,65], konamiStep=0;
window.addEventListener("keydown", function(event) {
if(event.keyCode==code[konamiStep]){konamiStep++;}else{konamiStep=0;}
if(konamiStep==code.length){
//KONAMI MAGIC HERE
konamiStep=0;
}
}, false);
You can’t perform that action at this time.