- Clonar un repositorio: git clone username@host:/path/to/repository
- Adicionar un archivo al stage: git add <filename>
- Adicionar varios archivos al stage: git add -A
- Hacer commit de los archivos adicionados: git commit -m "Commit message"
- Enviar los cambios al servidor remoto (rama master): git push origin master
- Ver el estatus de los archivos modificados: git status
- Crear una nueva rama y cambiarse a ella: git checkout -b <branchname>
- Cambiar de rama: git checkout <branchname>
- Traer los cambios en el servidor remoto al local: git pull
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
//JS ShortHand: | |
// 1- ternary operator | |
//- longHand | |
if (var1 > var2) { | |
resultado = 'Ok'; | |
} | |
else { | |
resultado = 'error'; | |
} |
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
{ | |
"always_show_minimap_viewport": true, | |
"caret_style": "solid", | |
"color_scheme": "Packages/Colorsublime - Themes/Monokai-Midnight.tmTheme", | |
"draw_minimap_border": true, | |
"font_size": 14, | |
"highlight_line": true, | |
"ignored_packages": | |
[ | |
"Vintage" |
1- conectar con el servidor: ssh @181.49.145.202 -p 29
2- crear usuarios: - crear usuario: adduser - asignar contraseña: passwd - vincular al usuario al grupo wheel (grupo administradores): usermod -aG wheel
3- actualizar a php 7 (desde php 5.x), debe estar instalado apache (verificar versión de apache: httpd -v):
- ir al home del usuario actual: cd ~
c++: var[] = {el1, el2, ..., elN};
c#: int[] var = {el1, el2, ..., elN};
vb: dim var = {el1, el2, ..., elN}
js: var = [el1, el2, ..., elN];
ruby: var = [el1, el2, ..., elN];
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
/* para nombrar clases y Id de objetos: | |
* camel case | |
* objeto padre: prefijo objeto + 3-6 caracteres que identifiquen al objeto | |
* objeto hijo: | |
* - cuando es un solo objeto: prefijo objeto + objeto padre | |
* - cuando son varios objetos : prefijo padre + 3-6 caracteres que identifiquen al objeto | |
*/ | |
objetos : { | |
b : 'botón', | |
// botones con acción |
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
{ | |
"window.menuBarVisibility": "default", | |
"workbench.statusBar.visible": true, | |
"workbench.activityBar.visible": false, | |
"editor.rulers": [ | |
120 | |
], | |
"editor.minimap.enabled": true, | |
"editor.renderIndentGuides": true, | |
"editor.dragAndDrop": true, |
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
var mensajesCommit = { | |
Add: 'Adicionar algo: caracteristica, archivo, etc.', | |
Delete: 'Eliminar algo: caracteristica, archivo, etc.', | |
Fix: 'Corregir algo: error, escritura, accidente, etc.', | |
Change: 'Cambiar un proceso, herramienta, función, etc.', | |
Make: 'Completar un proceso, herramienta, función, etc.', | |
Start: 'Iniciar algo: habilitar un proceso añadido.', | |
Stop: 'Finalizar algo: cerrar un proceso completo.', | |
Refactor: 'Refactorizar código.', | |
Reformat: 'Cambiar el formato de algo.', |
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
update tabla1 t1 | |
left join tabla2 as t2 on t2.id=t1.idt2 | |
left join tabla3 as t3 on t3.id = t2.idt3 | |
set t1.campo1 = t3.campo1 | |
where t1.campo1 is null; |
OlderNewer