Skip to content

Instantly share code, notes, and snippets.

View rcotrina94's full-sized avatar

Richard Cotrina rcotrina94

View GitHub Profile
@rcotrina94
rcotrina94 / Color.sh
Last active August 29, 2015 14:24
Color palettes
#!/bin/bash
#
# This file echoes a bunch of color codes to the
# terminal to demonstrate what's available. Each
# line is the color code of one foreground color,
# out of 17 (default + 16 escapes), followed by a
# test use of that color on all nine background
# colors (default + 8 escapes).
#
@rcotrina94
rcotrina94 / Setup.md
Last active February 13, 2016 19:50
Development Environment Setup

Actualizar índices de repositorios

sudo apt-get update

Instalar git

sudo apt-get install git

Instalar mercurial

sudo apt-get install mercurial
@rcotrina94
rcotrina94 / end_bashrc
Last active August 29, 2015 14:18
virtualenvwrapper
export WORKON_HOME=$HOME/.virtualenvs
export PROJECT_HOME=$HOME/webapps
source /usr/local/bin/virtualenvwrapper.sh
@rcotrina94
rcotrina94 / mistakes.md
Last active August 29, 2015 14:16
What are mistakes which software engineers make in the first 1-2 years of their career?

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 / Tabla de Kolmogorov-Smirnov en JS
Last active August 29, 2015 14:14
Tabla de Kolomogorov-Smirnov
Archivo de Constantes para: http://rcotrina.devux.pe/lab/uns/din-ii/2015-00/und1/FinalNumPseudo/
@rcotrina94
rcotrina94 / NGINX para Tumblr
Last active August 29, 2015 14:14 — forked from anonymous/gist:887026
Configuración de 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;
@rcotrina94
rcotrina94 / regex para staticfiles en Django
Last active May 9, 2023 08:17
Find and Replace Django static files from template
Find what:
`(href|src)="([a-zA-Z0-9/.-]+[^.html])"`
Replace with:
`$1=\"{% static "assets/$2" %}"`
<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 / How to use Images as Radio buttons.md
Last active February 22, 2024 13:29
How to use images for radio buttons (input-radio).