Skip to content

Instantly share code, notes, and snippets.

View gamorales's full-sized avatar

Guillermo Alfonso Morales gamorales

  • Santiago de Cali, Valle del Cauca, Colombia
View GitHub Profile
@gamorales
gamorales / navigation.css
Created June 18, 2020 20:52
Navigation bottom bar by @BauerVadim
width: 100%;
display: flex;
justify-content: space-around;
}
.menuElement{
opacity: 0.4;
transform: translateY(100%);
cursor: pointer;
&:hover{
@gamorales
gamorales / settings.json
Last active July 15, 2020 15:10
VS Code configuration for python and general
{
"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]": {
@gamorales
gamorales / generate_ppk.sh
Created August 23, 2020 13:27
Generate a ppk file.
#!/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/"
@gamorales
gamorales / php-site.conf
Created August 23, 2020 13:31
Register a new site in apache.
# 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
@gamorales
gamorales / test.py
Created March 6, 2021 10:33
Test coverage
def foo():
return 5
def main():
x = foo()
print(x)
if __name__ == '__main__': # pragma: no cover
@gamorales
gamorales / .gitconfig
Last active January 21, 2025 01:19
git alias
[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-