This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// The plugin looks for a .jsbeautifyrc file in the same directory as the | |
// source file you're prettifying (or any directory above if it doesn't exist, | |
// or in your home folder if everything else fails) and uses those options | |
// along the default ones. | |
// Details: https://github.com/victorporof/Sublime-HTMLPrettify#using-your-own-jsbeautifyrc-options | |
// Documentation: https://github.com/einars/js-beautify/ | |
"html": { | |
"allowed_file_extensions": ["htm", "html", "xhtml", "shtml", "xml", "svg"], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## COMPRESSION FUNCTION ## | |
compress() { | |
FILE=$1 | |
shift | |
case $FILE in | |
*.tar.bz2) tar cjf $FILE $* ;; | |
*.tar.gz) tar czf $FILE $* ;; | |
*.tgz) tar czf $FILE $* ;; | |
*.zip) zip $FILE $* ;; | |
*.rar) rar $FILE $* ;; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[[ $- != *i* ]] && return | |
function parse_git_branch { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' | |
} | |
PS1="[@\u \W]\$\[\e[1;32m\]\$(parse_git_branch)\[\e[0m\]" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Android usage | |
export PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/home/ixfh/Android/android-sdk-linux/platform-tools:/home/ixfh/Android/android-sdk-linux/tools | |
#export PATH:$PATH:/home/ixfh/Android/android-sdk-linux/platform-tools | |
#export PATH:$PATH:/home/ixfh/Android/android-sdk-linux/tools | |
export ANDROID_HOME='/home/ixfh/Android/android-sdk-linux' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias activateP=". venv/bin/activate" | |
alias 2p="python2.7" | |
alias ll='ls -lh --color=auto --group-directories-first' | |
alias ls='ls --color=auto' | |
alias pacman="sudo pacman" | |
alias github="cd ~/Documentos/github/" | |
alias gitlab="cd ~/Documentos/gitlab/" | |
alias ..="cd .." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ "keys": ["ctrl+shift+t"], "command": "delete_trailing_spaces" }, | |
{ "keys": ["ctrl+shift+o"],"command": "prompt_open_folder" }, | |
{ "keys": ["ctrl+g"], "command": "toggle_comment", "args": { "block": false } }, | |
{ "keys": ["ctrl+shift+g"], "command": "toggle_comment", "args": { "block": true } }, | |
{ "keys": ["f2"], "command": "toggle_menu" }, | |
{ "keys": ["ctrl+shift+d"], "command": "find_under_expand_skip" }, | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
github() { | |
path=$1 | |
count=0 | |
shift | |
case $path in | |
*) pathToList=$(ls -d ~/Documentos/github/* | cut -f6 -d '/') | |
pathToDir=($(ls -d ~/Documentos/github/*)) | |
for i in ${pathToList[*]}; | |
do | |
echo $count')' $i |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source /usr/share/nvm/init-nvm.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# With the basic (500 MB RAM) you will need a swap with 1 GB to run MEAN.js or | |
# Gitlab, you can do that following the steps above: | |
sudo swapon -s | |
sudo dd if=/dev/zero of=/swapfile bs=1024 count=2048k | |
sudo mkswap /swapfile | |
sudo swapon /swapfile | |
sudo echo '/swapfile none swap sw 0 0' > /etc/fstab | |
# This sets the system to swap memory only when RAM usage is more than 80%, | |
# default was swapping when RAM usage was more than 60%, which results in | |
# most of the services being swapped if you experience a traffic spike. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// flatten.js | |
const flatten = (array) => { | |
return array.reduce((acc, elm) => { | |
if (Array.isArray(elm)) { | |
acc.push(...flatten(elm)) | |
} else { | |
acc.push(elm); | |
} | |
return acc; |
OlderNewer