Skip to content

Instantly share code, notes, and snippets.

Avatar

Richard Cotrina rcotrina94

View GitHub Profile
@rcotrina94
rcotrina94 / How to vertically center HTML objects.
Last active Dec 23, 2015
How to vertically center HTML objects whitin a container
View How to vertically center HTML objects.
#How to vertically center HTML objects.
Only with pure HTML and CSS
Requirements:
- The height of the element's container must be known or specified.
@rcotrina94
rcotrina94 / How to use Images as Radio buttons.md
Last active May 10, 2022
How to use images for radio buttons (input-radio).
View How to use Images as Radio buttons.md
View designer.html
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-drawer-panel/core-drawer-panel.html">
<link rel="import" href="../core-field/core-field.html">
<link rel="import" href="../core-icon/core-icon.html">
<link rel="import" href="../core-input/core-input.html">
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../core-menu/core-submenu.html">
<link rel="import" href="../core-item/core-item.html">
@rcotrina94
rcotrina94 / regex para staticfiles en Django
Last active Nov 12, 2020
Find and Replace Django static files from template
View regex para staticfiles en Django
Find what:
`(href|src)="([a-zA-Z0-9/.-]+[^.html])"`
Replace with:
`$1=\"{% static "assets/$2" %}"`
@rcotrina94
rcotrina94 / NGINX para Tumblr
Last active Aug 29, 2015 — forked from anonymous/gist:887026
Configuración de nginx para Tumblr
View NGINX para Tumblr
upstream tumblr {
server 72.32.231.8:80;
}
server {
listen 80;
server_name _SERVER_NAME_;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
View Tabla de Kolmogorov-Smirnov en JS
Archivo de Constantes para: http://rcotrina.devux.pe/lab/uns/din-ii/2015-00/und1/FinalNumPseudo/
@rcotrina94
rcotrina94 / mistakes.md
Last active Aug 29, 2015
What are mistakes which software engineers make in the first 1-2 years of their career?
View mistakes.md

What are mistakes which software engineers make in the first 1-2 years of their career?

  1. Not being willing to learn new languages and skills. Not willing to read technical books.
  2. Not paying attention to performance: Use of good Data Structure and Algorithms
  3. Not paying attention to design: Design Pattern, Object Modeling, Best Practices
  4. Not paying attention to security: SQL Injection
  5. Not paying attention to testing: Writing test cases.
  6. Documentation: Improper logging and comments.
  7. Blind copy paste making an assumption that it would work.
  8. Forget to take backup and remove all debugging statements like System.out.print before application goes into production.
  9. Jumping directly on solution. Don't start solution hunting the moment you face a problem or bug. Even if you copy from others solution, don't forget to learn and understand the solution.
@rcotrina94
rcotrina94 / end_bashrc
Last active Aug 29, 2015
virtualenvwrapper
View end_bashrc
export WORKON_HOME=$HOME/.virtualenvs
export PROJECT_HOME=$HOME/webapps
source /usr/local/bin/virtualenvwrapper.sh
View Install Selenium.md
@rcotrina94
rcotrina94 / Setup.md
Last active Feb 13, 2016
Development Environment Setup
View Setup.md

Actualizar índices de repositorios

sudo apt-get update

Instalar git

sudo apt-get install git

Instalar mercurial

sudo apt-get install mercurial