Skip to content

Instantly share code, notes, and snippets.

View ryanrousseau's full-sized avatar
🏠
Working from home

Ryan Rousseau ryanrousseau

🏠
Working from home
View GitHub Profile
@ryanrousseau
ryanrousseau / configure-new-from-scratch
Created February 13, 2020 23:53
Configure Octopus Instance
"C:\Program Files\Octopus Deploy\Octopus\Octopus.Server.exe" create-instance --instance "OctopusServer" --config "C:\Octopus\OctopusServer.config" --serverNodeName "OCTOPUS-XPS"
"C:\Program Files\Octopus Deploy\Octopus\Octopus.Server.exe" database --instance "OctopusServer" --connectionString "Data Source=(local)\SQLEXPRESS;Initial Catalog=OctopusScriptTest;Integrated Security=True" --create --grant "NT AUTHORITY\SYSTEM"
"C:\Program Files\Octopus Deploy\Octopus\Octopus.Server.exe" configure --instance "OctopusServer" --webForceSSL "False" --webListenPrefixes "http://localhost:8080/" --commsListenPort "10943" --usernamePasswordIsEnabled "True"
"C:\Program Files\Octopus Deploy\Octopus\Octopus.Server.exe" service --instance "OctopusServer" --stop
"C:\Program Files\Octopus Deploy\Octopus\Octopus.Server.exe" admin --instance "OctopusServer" --username "admin" --email "admin@email.com" --password "YourPasswordHere"
"C:\Program Files\Octopus Deploy\Octopus\Octopus.Server.exe" service --instance "OctopusServer" --ins
serverUrl=$1
thumbprint=$2
apiKey=$3
space=$4
environment=$5
publicHostName=$6
role=$7
configFilePath="/etc/octopus/default/tentacle-default.config"
applicationPath="/home/Octopus/Applications/"
const functions = require('firebase-functions');
const admin = require('firebase-admin');
const rp = require('request-promise');
admin.initializeApp(functions.config().firebase);
let categoryToEmojiMapping = null;
let projectToChannelMapping = null;
let db = admin.firestore();
db.settings({ timestampsInSnapshots: true });
using Octokit;
public GitHubClient Create(string productHeaderValue)
{
var client = new GitHubClient(new ProductHeaderValue(productHeaderValue));
return client;
}
public class Greeter
{
public void Greet(string message)
{
Console.WriteLine(message);
}
}
#load "scriptTables.csx
ScriptTables("server", "db", "targetDirectoryPath");
Write-Output "Checking ChocolateyInstall env variable"
$chocolateyInstall = [Environment]::GetEnvironmentVariable("ChocolateyInstall")
if (!$chocolateyInstall) {
Write-Output "ChocolateyInstall env variable does not exist, using $ChocolateyInstallDir"
$chocolateyInstall = $ChocolateyInstallDir
[Environment]::SetEnvironmentVariable("ChocolateyInstall", $chocolateyInstall)
[Environment]::SetEnvironmentVariable("ChocolateyInstall", $chocolateyInstall, "Machine")
}
Console.WriteLine("Hello from https://gist.github.com/ryanrousseau/0dca8b3a74958f82406a !");
@ryanrousseau
ryanrousseau / gist:10731562
Last active August 29, 2015 13:59
Possible fix for IsNonDirectiveLine
public interface IDirectiveLineProcessor : ILineProcessor
{
bool Matches(string line);
}
public abstract class DirectiveLineProcessor : ILineProcessor
{
...
public bool Matches(string line)
{
using System.Collections.Generic;
using System.Linq;
using Common.Logging;
using ScriptCs.Contracts;
namespace ScriptCs.Exec
{
public class PrintFilePreprocessor : FilePreProcessor
{
public PrintFilePreprocessor(IFileSystem fileSystem, ILog logger, IEnumerable<ILineProcessor> lineProcessors)