How to NTLM with Apache 
Author: Josef Jezek
- Linux joined to win domain
- https://gist.github.com/9050408
set nocount on | |
declare @namespace varchar(500) | |
declare @schemaName varchar(50) | |
set @namespace = 'ConsoleApplication3.Data' | |
set @schemaName = 'dbo' | |
declare @typeMap table(sqlName varchar(50), dotNetName varchar(50), isNullable bit) |
using System; | |
using System.Collections.Generic; | |
using System.Text; | |
/// <summary> | |
/// Represents assembly, application, or other version information, | |
/// compliant with the Semantic Versioning specifications. | |
/// </summary> | |
/// <remarks> | |
/// See http://semver.org/ for specifications. |
public static Encoding GetFileEncoding(string path) | |
{ | |
if (path == null) | |
throw new ArgumentNullException("path"); | |
var encodings = Encoding.GetEncodings() | |
.Select(e => e.GetEncoding()) | |
.Select(e => new { Encoding = e, Preamble = e.GetPreamble() }) | |
.Where(e => e.Preamble.Any()) | |
.ToArray(); |
import sys | |
import urllib2 | |
from json import loads | |
from urllib import urlencode | |
import base64 | |
print sys.argv | |
LOG_FILE = 'uploads.log' | |
DEV_KEY = 'YOUR KEY HERE' # from http://imgur.com/register/api_anon |
using Dapper; | |
using Oracle.ManagedDataAccess.Client; | |
using System; | |
using System.Collections.Generic; | |
using System.Data; | |
using System.Linq; | |
public class OracleDynamicParameters : Dapper.SqlMapper.IDynamicParameters { | |
private static Dictionary<SqlMapper.Identity, Action<IDbCommand, object>> paramReaderCache = new Dictionary<SqlMapper.Identity, Action<IDbCommand, object>>( ); |
If you've got local source code you want to add to a new remote new git repository without 'cloning' the remote first, do the following (I often do this - you create your remote empty repository in bitbucket/github, then push up your source) | |
1. Create the remote repository, and get the URL such as git://github.com/youruser/somename.git | |
2. If your local GIT repo is already set up, skips steps 2 and 3 | |
3. Locally, at the root directory of your source, git init | |
4. Locally, add and commit what you want in your initial repo (for everything, | |
git add . |
Author: Josef Jezek
#pragma mark - GCDAsyncSocketDelegate | |
- (void)socket:(GCDAsyncSocket *)sock didConnectToHost:(NSString *)host port:(uint16_t)port { | |
[self secureSocket:sock]; | |
} | |
// We are connecting to server with self-signed certificate and don't include the certificate | |
// (public key .pem) in the client. So we skip all the cert checking. To actually check, see | |
// http://stackoverflow.com/questions/9874932/ssl-identity-certificate-to-run-an-https-server-on-ios | |
- (void)secureSocket:(GCDAsyncSocket *)sock { | |
// It has been changed in CocoaAsyncSocket v7.4, some old option keys are now unavailable and will throw exception. | |
// Use GCDAsyncSocketManuallyEvaluateTrust and evaluate in -socket:didReceiveTrust: delegate instead. |
:: Stop IIS | |
PsExec.exe \\LDNSERV01 -s -i C:\windows\system32\inetsrv\appcmd.exe stop site OnlineXCart | |
:: Recycle App Pool (removes lock on file system) | |
PsExec.exe \\LDNSERV01 -s -i C:\windows\system32\inetsrv\appcmd.exe recycle apppool OnlineXCart | |
:: Wait 4 Seconds | |
:: This is useful if you have a command straight after that executes file operations on IIS App Directory | |
ping -n 5 127.0.0.1 > nul |
#Transform web.config on build
</Project>
; v12.0 my change depending on your version of Visual Studio