Skip to content

Instantly share code, notes, and snippets.

Working from home

Julian David juliandavidmr

Working from home
View GitHub Profile
juliandavidmr / Crear.cshtml
Created Jan 8, 2017
Mostrar Select (html) con datos a partir de un DataTable en C# & Razor
View Crear.cshtml
<div class="">
@Html.LabelFor(model => model.griv_idgrupoinv, htmlAttributes: new { @class = "" })
@Html.DropDownList("griv_idgrupoinv", new SelectList(ViewBag.GrupoInv, "Text", "Value"), new { @class = "form-control" })
juliandavidmr / server.js
Created Jan 31, 2017
Servidor básico de NodeJS. Sin ExpressJS
View server.js
var mysql = require('mysql');
var connection = mysql.createConnection({
host: 'localhost',
user: 'root',
password: 'root',
database: 'personas',
port: 3306
View cli.js
#!/usr/bin/env node
'use strict';
var meow = require('meow');
var catNames = require('./');
var cli = meow([
' $ cat-names',
' Max',
View index.js
'use strict';
var uniqueRandomArray = require('unique-random-array');
var catNames = require('./cat-names.json');
exports.all = catNames;
exports.random = uniqueRandomArray(catNames);
View package.json
"name": "cat-names",
"version": "1.0.0",
"description": "Get popular cat names",
"license": "MIT",
"repository": "sindresorhus/cat-names",
"author": {
"name": "Sindre Sorhus",
"email": "",
"url": ""
View cat-names.json

Get popular cat names


$ npm install --save cat-names


View index.js
function (a, b) {
return a + b;
juliandavidmr / HomeController.cs
Created Feb 17, 2017
Implementacion de API OAuth Chaira en MVC Razor C#. Iniciar sesión y obtener información basica del usuario logeado.
View HomeController.cs
using System.Web.Mvc;
using Helpers;
using System.Web.Security;
namespace Project.Controllers {
public class HomeController : Controller {
juliandavidmr / stop_iis_windows.bash
Created Oct 8, 2017
Start or Stop the Web Server (IIS 7)
View stop_iis_windows.bash
# Stop
net stop WAS
# Start
# net start W3SVC