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
/* | |
cargo.toml | |
[dependencies] | |
actix = "0.9.0" | |
actix-rt = "1.0.0" | |
actix-web = { version="2.0.0", features=["openssl"] } | |
actix-service = "1.0.5" | |
env_logger = "0.6.1" | |
bytes = "0.5.4" |
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
param([switch] $Start) | |
function New-FileSystemWatcher( | |
[Parameter(Mandatory)][ValidateNotNullOrEmpty()] [string] $TargetFile, | |
[Parameter(Mandatory)][ValidateNotNull()] [ScriptBlock] $Action | |
) { | |
$fullPath = Resolve-Path $TargetFile | |
$fsw= New-Object System.IO.FileSystemWatcher | |
$fsw.Path = (Split-Path $fullPath -Parent) |
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 |
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
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
[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
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
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
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 |
NewerOlder