Skip to content

Instantly share code, notes, and snippets.

View abnersajr's full-sized avatar

Abner Soares Alves Junior abnersajr

View GitHub Profile
@abnersajr
abnersajr / commit_message.bash
Created July 27, 2018 15:19
Get TC-xxxx code and append to git commit message
#!/bin/bash
# Get TC-*** code and append to commit message
function commit_message() {
git commit -m "[$(git branch | grep -oP 'TC-\d*')] $1"
}
@abnersajr
abnersajr / learning_rails.md
Last active July 23, 2018 20:42
Learning Rails
@abnersajr
abnersajr / manjaro-install.sh
Last active August 27, 2018 19:04
Install Packer Manjaro
#!/usr/bin/env bash
# packer dependencies
sudo pacman -Sy git automake autoconf clang cmake fakeroot jshon expac base-devel unzip
# Install Yay instead of Packer using this link: https://www.ostechnix.com/yay-found-yet-another-reliable-aur-helper/
#Yay
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si
# initialization file (not found)
@abnersajr
abnersajr / settings_local.py
Created August 5, 2016 15:04
Settings Local used on beagleship with livereload
from settings import *
LOCAL_SETTINGS = True
DEBUG = True
TEMPLATE_DEBUG = True
ALLOWED_HOSTS = []
DATABASES = {}
@abnersajr
abnersajr / beagleship-copy.md
Created February 19, 2016 19:40
Copyright Beagleship Fiddle
@abnersajr
abnersajr / button menu close x
Created November 4, 2015 22:29
Button close menu scss
//<button class="btn-mobile-menu" type="button" role="button" aria-label="Alternar Navegação">
// <span class="lines"></span>
//</button>
$btn-mobile-size : 2rem;
$btn-mobile-color: #fff;
@mixin line {
display: inline-block;
width: $btn-mobile-size;
height: $btn-mobile-size/7;
background: $btn-mobile-color;
@abnersajr
abnersajr / .gitignore
Last active October 23, 2015 11:11
.gitignore file for laravel projects
/node_modules
### Laravel ###
/bootstrap/compiled.php
.env.*.php # Can be removed if your repo is private, if you can't set env variables via console
.env.php # Can be removed if your repo is private, if you can't set env variables via console
/vendors # Is basically composer and dependencies folders
Homestead.yaml
Homestead.json
@abnersajr
abnersajr / responsivePagePlugin.js
Last active April 7, 2016 19:25
Responsive page plugin of facebook. Wrap on .fb-container and will get the width of the container when resize, then will reparse
/**
* Reparse with facebook container width to responsive width
* @param {string} link Facebook Page link
* @param {string} title Page title
* @return {mixed} Return facebook plugin with new size
*/
function facebookResize(link, title) {
var FB_TITLE = title';
var FB_LINK = link';
var $FB_CONTAINER = $('.fb-container');
@abnersajr
abnersajr / traceRouteMap.js
Last active October 16, 2022 00:09
Trace Route using Maps API Javascript V3
function traceRouteMap() {
var mapElement = document.getElementById('google-map');
var directionsService = new google.maps.DirectionsService();
var startLatLng = new google.maps.LatLng(-29.687306,-53.815477);
var directionsDisplay= new google.maps.DirectionsRenderer();
var geocoder = new google.maps.Geocoder();
var markers = [];
var center;
var mapOptions = {
zoom: 12,