Skip to content

Instantly share code, notes, and snippets.

View adalbertopita's full-sized avatar

Adalberto Pita adalbertopita

View GitHub Profile
function hexify(color) {
var values = color
.replace(/rgba?\(/, '')
.replace(/\)/, '')
.replace(/[\s+]/g, '')
.split(',');
var a = parseFloat(values[3] || 1),
r = Math.floor(a * parseInt(values[0]) + (1 - a) * 255),
g = Math.floor(a * parseInt(values[1]) + (1 - a) * 255),
b = Math.floor(a * parseInt(values[2]) + (1 - a) * 255);
export CLICOLOR=1
export GREP_COLOR='1;37'
export GREP_OPTIONS='--color=auto'
export LSCOLORS=ExFxCxDxBxegedabagacad
# 30: Black | 31: Red | 32: Green | 33: Yellow | 34: Blue | 35: Purple | 36: Cyan | 37: White | green others...
# 0: Normal | 1: Bold
prompt() {
local CYAN='\[\033[0;36m\]'
local PURPLE='\[\033[0;35m\]'
Installers:
Git
sudo apt install git
Terminator
sudo apt-get install terminator
Vim
sudo apt-get install vim
@adalbertopita
adalbertopita / bash_aliases
Last active March 19, 2020 03:48
aliases
alias .='cd .'
alias ..='cd ..'
alias kill='kill -9'
alias la='ls -lah'
alias psx='ps aux | grep'
alias reload='source ~/.bashrc'
alias work='cd /home/adalberto/work'
alias clone='git clone'
alias fetch='git fetch --all && git fetch --tag'
alias ga='git commit -am'
function initMap() {
var startPlace = {lat: -12.9648489, lng: -38.4501421};
var infoWindow = new google.maps.InfoWindow;
var map = new google.maps.Map(document.getElementById('map'), {
zoom: 11,
center: startPlace
});
var positions = [],
pos;
{
"bold_folder_labels": false,
"caret_extra_width": 2,
"color_scheme": "Packages/Material Theme/schemes/Material-Theme-Darker.tmTheme",
"detect_slow_plugins": false,
"draw_white_space": "all",
"enable_tab_scrolling": false,
"fade_fold_buttons": false,
"file_selected_text": true,
"flatland_sidebar_tree_xsmall": false,
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
export CLICOLOR=1
export GREP_COLOR='1;37'
export GREP_OPTIONS='--color=auto'
export LSCOLORS=ExFxCxDxBxegedabagacad
# 30: Black | 31: Red | 32: Green | 33: Yellow | 34: Blue | 35: Purple | 36: Cyan | 37: White | green others...
# 0: Normal | 1: Bold
prompt() {
local CYAN='\[\033[0;36m\]'
local PURPLE='\[\033[0;35m\]'
alias .='cd .'
alias ..='cd ..'
alias ...='cd ../..'
alias bi='bundle install'
alias boxes='cd /home/adalberto/workspace/boxes'
alias bu='bundle update'
alias dch_release='/home/adalberto/workspace/dch_releaser/dch_release'
alias kill='kill -9'
alias la='ls -lah'
alias prost='cd /home/adalberto/workspace/prost'
alias clone='git clone'
alias fetch='git fetch --all && git fetch --tag'
alias ga='git commit -am'
alias gc='git commit'
alias gd='git difftool -y -x "sdiff" | less'
alias gg='gitg &'
alias gk='git checkout'
alias gl='git log --pretty=format:"%Cred%h%Creset%C(yellow)%d%Creset %s %Cgreen(%cr) %C(cyan )<%an>%Creset" --abbrev-commit'
alias gm='git merge'
alias gs='git status -sb'