Skip to content

Instantly share code, notes, and snippets.

View akrisiun's full-sized avatar

Andrius K akrisiun

View GitHub Profile
@akrisiun
akrisiun / DocumentFormat.OpenXml::GetCellValue.cs
Created July 15, 2016 08:30
DocumentFormat.OpenXml GetCellValue.cs
DocumentFormat.OpenXml::GetCellValue.cs
https://msdn.microsoft.com/en-us/library/office/hh298534.aspx?f=255&MSPPError=-2147217396
// Retrieve the value of a cell, given a file name, sheet name,
// and address name.
public static string GetCellValue(string fileName,
string sheetName,
string addressName)
{
@akrisiun
akrisiun / DBADICK PUBLIC LICENSE.md
Last active July 23, 2016 11:03
DBADICK PUBLIC LICENSE

DON'T BE A DICK PUBLIC LICENSE

find your language here

Version 1, December 2009

Copyright (C) 2009 Philip Sturgeon [email protected]

Everyone is permitted to copy and distribute verbatim or modified copies of this license document, and changing it is allowed as long

@akrisiun
akrisiun / Interop - Com - ComHelper.cs
Created July 25, 2016 15:40
ICatRegister cr = (ICatRegister) new StdComponentCategoriesMgr();
https://github.com/OpenLiveWriter/OpenLiveWriter/blob/69ea434f36a6f63cdc5c46286fe5ffb3279d7fee/src/managed/OpenLiveWriter.Interop/Com/ComHelper.cs
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for details.
using System;
using System.Diagnostics;
@akrisiun
akrisiun / nano-v3.md
Last active August 8, 2016 21:03
nano-v3.md - nanoTuva attempt v3
@powershell
cd e:\VM\nano3\

Set-ExecutionPolicy Unrestricted
Get-ExecutionPolicy -List

Import-Module .\NanoServerImageGenerator -Verbose

Accept external requests on both IPv4 and IPv6, port 5000:

var host = new WebHostBuilder()
    .UseUrls("http://+:5000")
    .UseKestrel()

nginx.conf -proxy-dotnet

@akrisiun
akrisiun / set-env.ps1
Created September 28, 2016 20:11
powershell set env value
[Environment]::SetEnvironmentVariable("MYVALUES_SERVER.URLS", "http://localhost:5100")
@akrisiun
akrisiun / Glimpse
Created September 29, 2016 09:40
Glimpse MVC4 async
https://github.com/Glimpse/Glimpse/commit/de958cb270477e4bf8133b0d72206dd15bd3a548
Fix #277 - Added Task<T> based async support to MVC
master v1.8.4
1.0.1-WebForms
1 parent f3f7f47 commit de958cb270477e4bf8133b0d72206dd15bd3a548 @nikmd23 nikmd23 committed on 12 Mar 2013
Unified Split
Showing 2 changed files with 11 additions and 11 deletions.
View
https://github.com/Microsoft/Docker.DotNet
Example: Basic HTTP Authentication to Docker
If the Docker instance is secured with Basic HTTP Authentication, you can use the Docker.DotNet.BasicAuth package. Get this package from NuGet or by running the following command in the “Package Manager Console”:
PM> Install-Package Docker.DotNet.BasicAuth
Once you added Docker.DotNet.BasicAuth to your project, use BasicAuthCredentials type:
var credentials = new BasicAuthCredentials ("YOUR_USERNAME", "YOUR_PASSWORD");
var config = new DockerClientConfiguration("tcp://ubuntu-docker.cloudapp.net:4243", credentials);

head -n

for file in .sql; do echo ${file###/} ; head -n 80 ${file##/} | cat > ${file##/}.md ; done

head top 80

osx bug head -n

for file in *.sql; do head -n 40 ${file###/} > src/_${file###/}; done

pv pipeline viewer