Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Ryan Rousseau ryanrousseau

🏠
Working from home
View GitHub Profile
View configure-new-from-scratch
"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
View install-linux-tentacle.sh
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/"
View index.js
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 });
View github.csx
using Octokit;
public GitHubClient Create(string productHeaderValue)
{
var client = new GitHubClient(new ProductHeaderValue(productHeaderValue));
return client;
}
View greeter.csx
public class Greeter
{
public void Greet(string message)
{
Console.WriteLine(message);
}
}
View example.csx
#load "scriptTables.csx
ScriptTables("server", "db", "targetDirectoryPath");
View Chocolatey - Ensure Installed.ps1
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")
}
View hello.csx
Console.WriteLine("Hello from https://gist.github.com/ryanrousseau/0dca8b3a74958f82406a !");
@ryanrousseau
ryanrousseau / gist:10731562
Last active Aug 29, 2015
Possible fix for IsNonDirectiveLine
View gist:10731562
public interface IDirectiveLineProcessor : ILineProcessor
{
bool Matches(string line);
}
public abstract class DirectiveLineProcessor : ILineProcessor
{
...
public bool Matches(string line)
{
View PrintFilePreprocessor.cs
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)