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
function Install-Java7JRE() | |
{ | |
# 7.0.79 | |
$url = "http://javadl.sun.com/webapps/download/AutoDL?BundleId=106369" | |
$filename = "jre-7u79-windows-x64.exe" | |
$downloadedFile = Join-Path $env:TEMP $filename | |
$javaHome = Join-Path $env:ProgramFiles "Java\jre7" | |
$jreForPathVariable = Join-Path $javaHome 'bin' | |
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
# https://tomcat.apache.org/tomcat-7.0-doc/windows-auth-howto.html | |
# https://shieldmaster.wordpress.com/2013/06/01/installing-apache-tomcat-v7-x-silently-with-command-line-options/ | |
$defaultTomcatVersion = "8.0.30" | |
function Get-TomcatFilename( | |
[string] $version = $defaultTomcatVersion | |
) | |
{ | |
return "apache-tomcat-$version.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
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Text.RegularExpressions; | |
using System.Xml; | |
using System.Xml.Linq; | |
namespace Formix.Utils | |
{ | |
class Program |
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 int ExecuteSql(string sql, object parameters = null) | |
{ | |
int result; | |
using (var connection = ConnectToDb()) | |
using (var command = new SqlCommand(sql, connection)) | |
{ | |
Log.Info(sql); | |
if (parameters != null) |
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
var fs = require('fs'); | |
fs.readFile('package.json', 'utf8', function(err, data){ | |
console.log("reading package.json"); | |
if (err) throw err; | |
obj = JSON.parse(data); | |
if (obj.devDependencies) { |
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
var fs = require('fs'); | |
fs.readFile('package.json', 'utf8', function(err, data){ | |
console.log("reading package.json"); | |
if (err) throw err; | |
obj = JSON.parse(data); | |
if (obj.devDependencies) { |
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
[System.Web.Http.HttpGet] | |
[System.Web.OData.EnableQuery] | |
[System.Web.Http.Route("~/api/v1/widgets/query", Name = "widgets-query")] | |
[ResponseType(typeof(List<widgetJson>))] | |
public IQueryable<widgetJson> Query(ODataQueryOptions<WidgetEntity> query) | |
{ | |
var odata = query.ApplyTo(_dbContext.widgets) | |
.Cast<WidgetEntity>() | |
.ToList() |
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 class ServiceHealthStatus | |
{ | |
public string Type { get; set; } | |
public string Status { get; set; } | |
public string[] Messages { get; set; } | |
public string Name { get; set; } | |
public string Data { get; set; } | |
} | |
public class ServiceHealthController : ApiController |
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
# BoxStarter script | |
#START http://boxstarter.org/package/nr/url?<raw url> | |
Set-ExplorerOptions -showHiddenFilesFoldersDrives -showProtectedOSFiles -showFileExtensions | |
Enable-RemoteDesktop | |
Move-LibraryDirectory "Personal" "$env:UserProfile\OneDrive\documents" | |
cinst 7zip | |
cinst chrome |
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
Windows Registry Editor Version 5.00 | |
[HKEY_CURRENT_USER\SOFTWARE\Policies\Microsoft\Windows\Explorer] | |
"ShowRunAsDifferentUserInStart"=dword:00000001 |