Skip to content

Instantly share code, notes, and snippets.

View ferventcoder's full-sized avatar
🎯
Focusing

Rob Reynolds ferventcoder

🎯
Focusing
View GitHub Profile
@ferventcoder
ferventcoder / stopservice.pp
Created August 28, 2013 15:30
Puppet Stop Service Exec Example
exec { 'stop-CryptSvc':
command => 'C:\Windows\System32\cmd.exe /c "net stop CryptSvc"'
}
@ferventcoder
ferventcoder / InstallVagrantWindowsPluginFromSource.ps1
Last active November 19, 2016 04:40
Install Vagrant-Windows plugin from source
# WINDOWS
# =======
# This assumes you already have chocolatey installed:
# From cmd.exe:
# @powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%systemdrive%\chocolatey\bin
# From powershell:
# iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))
#
# This assumes you have vagrant already installed:
# cinst vagrant
@ferventcoder
ferventcoder / .bash-constants.sh
Last active July 29, 2020 18:51
Git bash setup
# Reset
Color_Off="\[\033[0m\]" # Text Reset
# Regular Colors
Black="\[\033[0;30m\]" # Black
Red="\[\033[0;31m\]" # Red
Green="\[\033[0;32m\]" # Green
Yellow="\[\033[0;33m\]" # Yellow
Blue="\[\033[0;34m\]" # Blue
Purple="\[\033[0;35m\]" # Purple
@ferventcoder
ferventcoder / PuppetFile
Created July 5, 2013 15:28
Boxen config for mongodb - an example
#https://github.com/ferventcoder/boxen#including-boxen-modules-from-github-boxenpuppet-
github "mongodb", "1.0.4"
@ferventcoder
ferventcoder / Abstratct: DevOps: Getting Started with Puppet on Windows.md
Last active December 18, 2015 07:09
DevOps: Getting Started with Puppet on Windows

You keep hearing about DevOps and how awesome it is, if you have Linux. Well Windows can be awesome with DevOps, too. And it's just going to keep getting better. If you are on Windows and you are even remotely interested in making things better, then you should come out and see what Puppet is all about and what it can do for your organization.

@ferventcoder
ferventcoder / ConcatenateDatabaseScripts.ps1
Created May 30, 2013 16:02
Concatenate Database scripts into one
param(
[alias("startWith")]
[string]$startFile=''
)
$scriptDir = $(Split-Path -parent $MyInvocation.MyCommand.Definition)
$dateNow = Get-Date -format "yyyyMMdd_HHmmss"
$fileNameToSaveTo = 'SingleMigration.' + $dateNow + '.sql'
$fileToSaveTo = Join-Path $scriptDir "src\Database\somedb-concat\$($fileNameToSaveTo)"
@ferventcoder
ferventcoder / 1_Log4NetCustomSmtpAppender.cs
Created April 5, 2013 16:11
If you are not ready to upgrade to 1.2.11, you can always explore this option.
/// <summary>
/// This is a custom appender so that we can set enable SSL properly (and support TLS)
/// </summary>
public class SmtpCustomAppender : SmtpAppender
{
public bool EnableSsl { get; set; }
public SmtpCustomAppender()
{
Authentication = SmtpAuthentication.None;
Rebasing is another way to interact with a remote repository.
What it does is take your changes, not yet on the remote, and pulls them off to the side.
Then it puts all of the changes in the remote on your repository. After that it puts
your changes after the changes from the remote.
This results in less merge errors because you are putting your work at the end.
What does it look like?
git fetch
Say you are in a world where you want to use progressive enhancement (sometimes for accessibility)
with ASP.NET MVC 3+.
Progressive Enhancement means the site WORKS WITHOUT JAVASCRIPT FOLKS.
Now say you have something like comments that will be on multiple pages.
You want the site to be maintainable so you want to use a partial with
form submission.
@ferventcoder
ferventcoder / S3Backup.ps1
Created December 12, 2012 15:23
S3 Backup using CloudBerry's snapin
$bucket = 'somebucket'
$bucketSubFolder = 'subfolderkey'
$s3AccessKey = $env:AWS_S3__AccessKey
$s3Secret = $env:AWS_S3_Secret
$destinationFolder = "$bucket/$bucketSubFolder"
$localFolder = "C:\Users\user\somefolder"
#http://www.cloudberrylab.com/default.aspx?page=amazon-s3-powershell
Add-PSsnapin cloudberrylab.explorer.pssnapin