Skip to content

Instantly share code, notes, and snippets.

View rcotrina94's full-sized avatar

Richard Cotrina rcotrina94

View GitHub Profile
@rcotrina94
rcotrina94 / install-rtl8723de.md
Last active March 16, 2024 13:17
Realtek Semiconductor RTL8723DE Device d723 Linux Ubuntu
@rcotrina94
rcotrina94 / install.md
Last active July 8, 2018 18:44
Instalando PyFBA en Ubuntu 18.04

INSTALAR LIBRERÍAS EN EL SISTEMA

sudo apt-get install libglpk-dev glpk-utils glpk-doc libglpk40 libgmp10 libgmpxx4ldbl

INSTALAR LIBRERÍAS DE PYTHON

mkdir ~/pyfba
@rcotrina94
rcotrina94 / .hgignore
Created June 2, 2017 01:26
Mercurial Ignore File for Django (Python) Projects
# glob syntax
syntax: glob
# Temp files
*.bak
*.orig
*.pyc
*~
# Nodejs
@rcotrina94
rcotrina94 / server.js
Created March 6, 2017 21:28
NodeJS server with CORS headers.
var socket = require('socket.io'),
http = require('http'),
server = http.createServer(function(req, res){
res.setHeader('Access-Control-Allow-Origin', '*');
// res.setHeader('Access-Control-Request-Method', '*');
// res.setHeader('Access-Control-Allow-Methods', 'OPTIONS, GET');
// res.setHeader('Access-Control-Allow-Headers', '*');
/*
if ( req.method === 'OPTIONS' ) {
res.writeHead(200);
@rcotrina94
rcotrina94 / telebrambot.py
Last active May 10, 2016 20:53
Telegram.bot
# -*- coding: utf-8 -*-
import telebot
from telebot import types
USER_WELCOME = "Bienvenido al servicio de HomeHub."
USER_REGISTERED = "{}, te hemos registrado en nuestro sistema."
TOKEN = "123456789:TOKEN4529424024-ConfiguraTuTokenXDXDXDXD"
bot = telebot.TeleBot(TOKEN)
|||||||||||||||||||||||||||||||||||||||||
|||||||||||||||||||||||||||||||||||||||||
|||||||||||||||||||||||||||||||||||||||||
|||||||||||||||||||||||||||||||||||||||||
|||||||||||||||||||||||||||||||||||||||||
||||||||||||||||| ||||||||||||||||||||||
|||||||||||||||| ||||||||||||||||||||
|||||||| ||||| . ||||||||||||||
|||||| |||| |||||||||||||||
|||||| |||||||||||||||||
@rcotrina94
rcotrina94 / exporting-with-django-export-import.md
Last active March 24, 2016 17:30
Exportar en Django con "django-export-import"

Exportar en Django con "django-export-import"

django-export-import es un paquete de django que nos facilita la tarea de exportar e importar desde y hacia diferentes formatos de datos (CSV, XLS, JSON, HTML).

Éste paquete tiene 4 clases que serán las que más se utilizarían para exportar (y quizás también importar) fácilmente desde nuestra aplicación de Django.

class import_export.resource.ModelResource

Ésta clase nos sirve para poder utilizar los modelos de Django como recursos (Resources)

class import_export.resource.ResourceOptions (Meta)

@rcotrina94
rcotrina94 / devLearning.md
Last active October 25, 2023 09:19
What do professional developers think of online programming courses such as Codecademy or Code School?

What do professional developers think of online programming courses such as Codecademy or Code School?

by Song Zheng,Developer

90% of the people who use Codecademy and Codeschool to try to learn coding fail. This is because 90% of people who turn to Codecademy and Codeschool are learning programming for the sake of learning how to code. This is why you will not be hired if you list Codecademy and/or CodeSchool badges on your resume.

The other 10% of people who use Codecademy or Codeschool become successful developers because they are learning programming to build a tictactoe game to play with their friends; a ecommerce site so they can sell things; a video chat app to connect with relatives; etc.

There is a very different mentality between the 90% and the 10% who are learning programming, and the successful ones are those who sees learning platforms as means to an end, not the end itself. For example, if you have no programming experience and want to learn how to code, your goal should not be claimi

@rcotrina94
rcotrina94 / setup.md
Last active May 6, 2021 09:48
Install Moodle on NGINX
{% extends "base/main.html" %}{% load staticfiles bootstrap %}
{% block header %}
{% endblock %}
{% block content %}
<div id="login-form" class="vcenter">
<div class="container-fluid">
<form method="POST" enctype="multipart/form-data" autocomplete="off">
{% csrf_token %}
<div class="col-xs-10 col-xs-offset-1 col-sm-6 col-sm-offset-3 col-lg-4 col-lg-offset-4">
<div class="panel panel-default">