Skip to content

Instantly share code, notes, and snippets.

View rcotrina94's full-sized avatar

Richard Cotrina rcotrina94

View GitHub Profile
<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 / 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 / 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 / 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 / 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 / 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).
#

#Linux FAQs

@rcotrina94
rcotrina94 / run.py
Created September 22, 2015 14:13
Run ALU raspberry pi server
# -*- coding: utf-8 -*-
import numdisplay
from datetime import datetime
from flask import Flask
app = Flask(__name__)
@app.route("/num/<int:number>")
def num(number=None):
if number == None:
@rcotrina94
rcotrina94 / alu.ino
Last active September 30, 2015 01:23
Alu Arduino
//Entradas para A
int iA0 = 13;
int iA1 = 12;
int iA2 = 11;
int iA3 = 10;
//Entradas para B
int iB0 = 9;
int iB1 = 8;
int iB2 = 7;