Skip to content

Instantly share code, notes, and snippets.

View cdenneen's full-sized avatar

Chris Denneen cdenneen

  • New York
View GitHub Profile
@cdenneen
cdenneen / fact_spec.rb
Last active June 26, 2018 03:19 — forked from rodjek/fact_spec.rb
Facter stubbing examples
require 'rspec'
require 'facter'
describe 'facter_value' do
context 'when stubbing Facter::Util::Collection#fact' do
before(:each) do
stub_fact = instance_double(Facter::Util::Fact, :value => 'foo')
allow(Facter.collection).to receive(:fact).with(:test_fact).and_return(stub_fact)
end
---
.cache_bundler: &cache_bundler
cache:
untracked: true
key: "$CI_BUILD_REF_NAME"
paths:
- '.vendor'
- 'vendor'
.setup_bundler_env: &setup_bundler_env
@cdenneen
cdenneen / WSL-ssh-server.md
Created March 1, 2018 15:47 — forked from dentechy/WSL-ssh-server.md
A step by step tutorial on how to automatically start ssh server on boot on the Windows Subsystem for Linux

How to automatically start ssh server on boot on Windows Subsystem for Linux

Microsoft partnered with Canonical to create Bash on Ubuntu on Windows, running through a technology called the Windows Subsystem for Linux. Below are instructions on how to set up the ssh server to run automatically at boot.

  1. Uninstall and reinstall the ssh server using the following commands:
    1. sudo apt remove openssh-server
    2. sudo apt install openssh-server
  2. Edit the /etc/ssh/sshd_config file by running the command sudo vi /etc/ssh/sshd_config and do the following
    1. Change Port to 2222 (or any other port above 1000)
  3. Change UsePrivilegeSeparation to no
@cdenneen
cdenneen / nxlog.conf
Last active August 29, 2015 14:06 — forked from mrlesmithjr/nxlog.conf
## Please set the ROOT to the folder your nxlog was installed into,
## otherwise it will not start.
#define ROOT C:\Program Files\nxlog
define ROOT C:\Program Files (x86)\nxlog
define ROOT_STRING C:\Program Files (x86)\\nxlog
Moduledir %ROOT%\modules
CacheDir %ROOT%\data
Pidfile %ROOT%\data\nxlog.pid