-
Download and install Squid 3.5 for Windows (default path is C:\Squid)
-
Create file C:\Squid\etc\.htpasswd with the following content:
admin:$apr1$kWA/DRFy$klaeXRe3S3jIPqc64HTMA0
This corresponds to username admin and password 1234
To generate your own username/password use http://www.htaccesstools.com/htpasswd-generator-windows/ -
Open Squid configuration (squid.conf)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[global] | |
floatX = float32 | |
# pycuda didn't work so using "new backend" | |
# pygpu+libgpuarray installed via conda ("conda install pygpu") | |
device = cuda | |
[nvcc] | |
# CUDA v8.0 installed over VS 2012 | |
compiler_bindir=C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\cl.exe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Connect your account, you will be prompted to enter your credentials in the popup | |
Add-AzureAccount | |
# Check that your subscription has been loaded | |
Get-AzureSubscription | |
# Select a subscription as default if needed | |
Select-AzureSubscription -Default <SubscriptionName> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static MvcHtmlString LocalDateTime(this HtmlHelper helper, DateTime utcDateTime) | |
{ | |
return new MvcHtmlString( | |
String.Format( | |
"<script>var d=new Date('{0}');document.write(new Date(d.getTime()-d.getTimezoneOffset()*60000))</script>", | |
utcDateTime.ToString("g"))); | |
} |
Custom action (in C# dll):
[CustomAction]
public static ActionResult TestDbConnection(Session session)
{
using (var connection = new SqlConnection(session["CONNECTION_STRING"]))
{
try
{
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Collections.Specialized; | |
using System.Globalization; | |
using System.Linq; | |
using System.Net.Http; | |
using System.Security.Cryptography; | |
using System.Text; | |
namespace AwsV4SignatureCalculator |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// assuming elements in a set do not repeat | |
let rec kCombinations k (set: 'a list) = | |
match k with | |
| 1 -> set |> List.map (fun x -> [x]) | |
| _ -> | |
match set with | |
| [] -> [] | |
| head::tail -> | |
(tail |> kCombinations (k - 1) |> List.map (fun x -> head::x)) | |
@ (tail |> kCombinations k) |