Skip to content

Instantly share code, notes, and snippets.

View consigliory's full-sized avatar

Roman Petrenko consigliory

  • Denmark
View GitHub Profile
@consigliory
consigliory / install_chrome.ps1
Created January 19, 2018 11:37
install chrome using powershell
$Path = $env:TEMP; $Installer = "chrome_installer.exe"; Invoke-WebRequest "http://dl.google.com/chrome/install/375.126/chrome_installer.exe" -OutFile $Path\$Installer; Start-Process -FilePath $Path\$Installer -Args "/silent /install" -Verb RunAs -Wait; Remove-Item $Path\$Installer
interface Iterator<T> {
next(value?: any): IteratorResult<T>;
return?(value?: any): IteratorResult<T>;
throw?(e?: any): IteratorResult<T>;
}
@consigliory
consigliory / demo.cs
Created May 27, 2017 16:56
Test gist
public class Demo{
public Demo(){
var test = 12;
}
}
@consigliory
consigliory / nginxproxy.md
Created January 30, 2017 14:50 — forked from soheilhy/nginxproxy.md
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

let person = 10;
const demo = true;
function yes(){
let person = 12;
}

This is a fork of Bootstrap Typeahead that adds minimal but powerful extensions.

For example, process typeahead list asynchronously and return objects

  # This example does an AJAX lookup and is in CoffeeScript
  $('.typeahead').typeahead(
    # source can be a function
    source: (typeahead, query) ->
 # this function receives the typeahead object and the query string
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Http;
using System.Web.Mvc;
using System.Web.Routing;
namespace MvcApplication7
{
var customers = (new List<Customer>{
- new Customer { CustomerId = 1, Name = "ACME", Website = "http://www.acme.co.uk" },
+ new Customer { CustomerId = 1, Name = "ACME", Website = "http://www.acme.net" },
new Customer { CustomerId = 2, Name = "AAAA", Website = "http://www.aaaa.com" },
- new Customer { CustomerId = 3, Name = "ACME", Website = "http://www.acme.co.nz" }
+ new Customer { CustomerId = 3, Name = "ACME", Website = "http://www.acme.com" }
}).AsQueryable();
<div id="logo"><img src="images/logo.png" alt="Developer Drive" /></div>
<nav>
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">Portfolio</a></li>
<li><a href="#">Services</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Blog</a></li>
<li class="last"><a href="#">Contact</a></li>
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
namespace System.Data.Entity.Core.EntityClient
{
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data.Common;
using System.Data.Entity.Resources;
using System.Diagnostics;