Skip to content

Instantly share code, notes, and snippets.

View juliandavidmr's full-sized avatar
:octocat:
Working from home

Julian David juliandavidmr

:octocat:
Working from home
View GitHub Profile
@juliandavidmr
juliandavidmr / Crear.cshtml
Created January 8, 2017 21:03
Mostrar Select (html) con datos a partir de un DataTable en C# & Razor
<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" })
</div>
@juliandavidmr
juliandavidmr / server.js
Created January 31, 2017 18:29
Servidor básico de NodeJS. Sin ExpressJS
var mysql = require('mysql');
var connection = mysql.createConnection({
host: 'localhost',
user: 'root',
password: 'root',
database: 'personas',
port: 3306
});
#!/usr/bin/env node
'use strict';
var meow = require('meow');
var catNames = require('./');
var cli = meow([
'Examples',
' $ cat-names',
' Max',
'use strict';
var uniqueRandomArray = require('unique-random-array');
var catNames = require('./cat-names.json');
exports.all = catNames;
exports.random = uniqueRandomArray(catNames);
{
"name": "cat-names",
"version": "1.0.0",
"description": "Get popular cat names",
"license": "MIT",
"repository": "sindresorhus/cat-names",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
@juliandavidmr
juliandavidmr / cat-names.json
Created February 8, 2017 05:20
list cat names
[
"Abby",
"Angel",
"Annie",
"Baby",
"Bailey",
"Bandit",
"Bear",
"Bella",
"Bob",

Get popular cat names

Install

$ npm install --save cat-names

Usage

function (a, b) {
return a + b;
}
@juliandavidmr
juliandavidmr / HomeController.cs
Created February 17, 2017 01:07
Implementacion de API OAuth Chaira en MVC Razor C#. Iniciar sesión y obtener información basica del usuario logeado.
using System.Web.Mvc;
using Helpers;
using System.Web.Security;
namespace Project.Controllers {
[AllowAnonymous]
public class HomeController : Controller {
[HttpGet]
@juliandavidmr
juliandavidmr / stop_iis_windows.bash
Created October 8, 2017 16:59
Start or Stop the Web Server (IIS 7)
# Stop
net stop WAS
# Start
# net start W3SVC