Skip to content

Instantly share code, notes, and snippets.

View MauricioDinki's full-sized avatar

Mauricio Ivan Mejía Ramirez MauricioDinki

View GitHub Profile
<script type="application/javascript">
alert("HELLO")
</script>
#include "stdio.h"
#include "stdlib.h"
#include "string.h"
// Atraves de la tecnica de la burbuja
int main(int argc, char const *argv[]) {
char busqueda[30];
var x = document.getElementsByTagName("td");
var y = document.getElementById("ctl00_mainCopy_Lbl_Promedio");
var number = 8;
y.innerHTML = "7.85";
x[203].innerHTML = "8";
x[191].innerHTML = "8";
var elem = document.getElementById('ctl00_mainCopy_grvEstatus_alumno');
elem.parentNode.removeChild(elem);
@MauricioDinki
MauricioDinki / server
Last active April 7, 2017 21:39
nginx server
upstream app_server {
server 127.0.0.1:9000 fail_timeout=0;
}
server {
listen 80;
server_name <server name>;
return 301 https://$server_name$request_uri;
}
@MauricioDinki
MauricioDinki / gunicorn_start
Created February 14, 2016 04:38
gunicorn start to run a django app
#!/bin/bash
# This runs on 9000 port
NAME="appname"
VIRTUALENV="virtualenv folder"
DJANGO_DIR="django root folder"
USER=root
GROUP=sudo
NUM_WORKERS=5
@MauricioDinki
MauricioDinki / gunicorn.conf
Created February 14, 2016 04:35
Service to run gunicorn as a service
description "Gunicorn daemon for Django project"
start on (local-filesystems and net-device-up IFACE=eth0)
stop on runlevel [!12345]
script
/home/django/pinchefv2/deploy/gunicorn_start
end script
@MauricioDinki
MauricioDinki / nginx.conf
Created January 23, 2016 19:04 — forked from rafaelmv/nginx.conf
Nginx config for a simple server
server {
listen 80;
server_name subdomain1.domain.com;
location / {
proxy_pass http://localhost:{YOUR_PORT};
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
@MauricioDinki
MauricioDinki / add_os_repositories.sh
Last active December 17, 2015 21:57
Install dependencies for the system
#!/bin/bash
# Spotify
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys D2C19886
echo deb http://repository.spotify.com stable non-free | tee /etc/apt/sources.list.d/spotify.list
# System Monitor Indicator
add-apt-repository ppa:fossfreedom/indicator-sysmonitor
# Diodon Indicator
@MauricioDinki
MauricioDinki / factorial.py
Last active September 1, 2015 23:53
Get the factorial of a number using python validations
#!/usr/bin/env python
# -*- coding: utf-8 -*-
factorial = 1
number = raw_input("Insert a number\n")
if number is '':
print("No ingresaste Nada")
elif number.isspace():