This file contains hidden or 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] | |
s = status | |
lg = log --graph --oneline --decorate --color --pretty=format:\"%C(auto)%h %d %Creset%s > %Cblue%cn %Creset [%Cgreen%cd%Creset]\" | |
usu = log --pretty=format:\"%cn committed %h on %cd\" | |
p = git status push origin feature/PTS-1355-mobile-redirect | |
pu = git status pull origin feature/PTS-1355-mobile-redirect | |
lgusu = log --graph --oneline --decorate --color --pretty=format:\"%C(auto)%h %d %Creset %s > %Cblue%cn %Creset\" | |
cm = "!f() { git commit -m \"PTS-$1: $2\"; }; f" | |
new = "!f() { \n if [[ \"$1\" =~ ^(issue|feature|devops)$ ]] && [[ \"$2\" =~ ^[0-9]+$ ]] && [[ \"$3\" =~ ^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$ ]]; then \n git checkout -b \"$1/PTS-$2-$3\"; \n else \n echo \"Usage: git new <issue|feature|devops> <number> <text-with-dashes>\"; \n echo \"Example: git new feature 123 update-api-endpoint\"; \n return 1; \n fi; \n}; f" | |
del = "!f() { \n if [[ \"$1\" =~ ^(issue|feature|devops)$ ]] && [[ \"$2\" =~ ^[0-9]+$ ]] && [[ \"$3\" =~ ^[a-zA-Z0-9]+(-[a-zA-Z0- |
This file contains hidden or 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
def foo(): | |
return 5 | |
def main(): | |
x = foo() | |
print(x) | |
if __name__ == '__main__': # pragma: no cover |
This file contains hidden or 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
# Crear nuevo archivo de configuración en /etc/apache2/sites-available/php-site.conf | |
<VirtualHost *:80> | |
ServerName www.andrea.pos | |
ServerAlias andrea.pos | |
DocumentRoot /var/www/html/pos_andrea/posMain/application | |
<Directory /var/www/html/pos_andrea/posMain/application> | |
AllowOverride All | |
Options FollowSymLinks MultiViews | |
Order allow,deny |
This file contains hidden or 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
#!/bin/bash | |
# RadicalEd | |
# Genera clave de conexión ssh y archivo ppk | |
RED='\033[0;31m' | |
GREEN='\033[1;32m' | |
BLUE='\033[1;34m' | |
NC='\033[0m' | |
DIRSSH="$HOME/.ssh/" | |
DIRPPK="$HOME/Documentos/proyectos/ppk/" |
This file contains hidden or 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
{ | |
"editor.rulers": [80, 100], | |
"window.zoomLevel": 0, | |
"editor.fontSize": 14, | |
"editor.renderWhitespace": "all", | |
"editor.multiCursorModifier": "ctrlCmd", | |
"editor.snippetSuggestions": "top", | |
"editor.formatOnPaste": true, | |
"editor.minimap.enabled": false, | |
"[yaml]": { |
This file contains hidden or 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
import os | |
import shutil | |
source_path = '/<path>/<to>/<folder>/app-debug.apk/' | |
main_pkg_dir = './<android_project_directory_name>/' | |
def create_dir(dir_list): | |
global main_pkg_dir |
This file contains hidden or 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
"vgit clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim | |
" vim-fugitive A status bar for Git with shortcuts for many Git tasks. | |
" tagbar A pane for making it easier to jump to functions, methods, and classes. | |
" To install -> :PluginInstall» | |
" To delete all plugins -> :PluginClean | |
" List installed plugins -> :PluginList | |
" To install from shell -> vim +PluginInstall +qall | |
" sudo apt install exuberant-ctags -y | |
syntax on |
This file contains hidden or 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
def order_vowels_reverse(string): | |
list_string = [_ for _ in string] | |
vowels = 'aeiouAEIOU' | |
vowels_pos = list(filter(lambda car: car in vowels, string)) | |
reverse = vowels_pos[::-1] | |
index = 0 | |
for car in range(len(list_string)): | |
if index < len(vowels_pos): |
This file contains hidden or 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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# Encrypt and Decrypt idea extracted from http://rodrigogr.com/blog/cifrado-de-transposicion/ | |
import math | |
def main(): | |
text_encrypt = 'Guillermo Alfonso Morales, 1983-02-12, Santiago de Cali' | |
key_length = int(len(text_encrypt) / 4) | |
NewerOlder