This file contains hidden or 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
| iex ((New-Object System.Net.WebClient).DownloadString("https://gist.githubusercontent.com/pizycki/949a0b2dde34bdb7bcb71c0226d3f107/raw/SpotifyInstall.ps1")) |
This file contains hidden or 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 Microsoft.Extensions.DependencyInjection; | |
| using Xunit; | |
| namespace InjectDependencyWithProperty.src | |
| { | |
| public class UsersStorage | |
| { | |
| public void Create(object user) | |
| { |
This file contains hidden or 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
| open Suave | |
| open Argu | |
| type Args = | |
| | [<EqualsAssignment>] IP of host:string | |
| | [<EqualsAssignment>] Port of port:int | |
| with | |
| interface IArgParserTemplate with | |
| member s.Usage = | |
| match s with |
This file contains hidden or 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.Collections.Generic; | |
| using System.Collections.Immutable; | |
| using System.Diagnostics; | |
| using CSharpFunctionalExtensions; | |
| namespace Common | |
| { | |
| public class ProcessRunner | |
| { | |
| private const int PROCESS_TIMEOUT = 1000 * 60; // ms |
This file contains hidden or 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
| // Discriminated Union | |
| public abstract class DivideResult | |
| { | |
| public class Success : DivideResult | |
| { | |
| public double Value { get; } | |
| private Success(double value) | |
| { |
This file contains hidden or 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
| // # Ghost Startup | |
| // Orchestrates the startup of Ghost when run from command line. | |
| var ghost = require('./core'), | |
| express = require('express'), | |
| errors = require('./core/server/errors'), | |
| parentApp = express(), | |
| hsts = require('hsts'), | |
| express_enforces_ssl = require('express-enforces-ssl'); |
This file contains hidden or 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
| // Place this in .fsproj | |
| // <ItemGroup> | |
| // <PackageReference Include="Dapper.Contrib" Version="1.60.1" /> | |
| // <PackageReference Include="MySqlConnector" Version="0.56.0" /> | |
| // </ItemGroup> | |
| open Dapper | |
| open MySql.Data.MySqlClient | |
| // CREATE TABLE `8833_rw_dev`.`Releases` ( |
This file contains hidden or 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
| // Based on https://stackoverflow.com/a/24293478/864968 |
This file contains hidden or 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.Concurrent; | |
| using System.Text; | |
| using RabbitMQ.Client; | |
| using RabbitMQ.Client.Events; | |
| namespace Client | |
| { | |
| public class RpcClient | |
| { |
This file contains hidden or 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 ( | |
| [Parameter(Mandatory = $true)] $RepositoryPath, | |
| [Parameter(Mandatory = $true)] $Days | |
| ) | |
| function Get-BranchesInRepository([string]$path){ | |
| Push-Location | |
| try { | |
| Set-Location $path | |
| $branches = git for-each-ref --sort='-committerdate:iso8601' --format='%(committerdate:iso8601)|%(refname:short)|%(committeremail)|%(committername)' refs/remotes/ |