Skip to content

Instantly share code, notes, and snippets.

View elovelan's full-sized avatar

Eric Loveland elovelan

View GitHub Profile

TODO.it Requirements

TODO.it is a simple command line application designed to capture and manage TODO tasks from the command-line. Designed as a beginner ruby challenge.

Any thing marked in (( double parenthasis )) are examples or ideas for the challenger to pick.

The app must

  • Accept input from the command ((an input prompt or command-line arguments))
  • Display active tasks
Function PrintDetails
{
Param (
$ComputerName,
$DriveLetter = "",
$VolumeName = "",
$Error = ""
)
$obj = New-Object PSObject
@elovelan
elovelan / manilla-downloader.js
Last active August 29, 2015 14:01
Manilla-downloader
(function() {
/* Edit if you have a slow connection! */
var delayInSeconds = 2;
var csv = "";
function download() {
var dataRows, getNext, max, curr = 0, nextPage;
nextPage = $("a.next_page");
dataRows = $("tr.doc");
max = dataRows.length;
@elovelan
elovelan / apt-get output
Last active August 29, 2015 14:17
Error installing puppetserver-2.0.0.SNAPSHOT.deb
Setting up puppetserver (2.0.0.SNAPSHOT.2015.03.14T0121-1puppetlabs1) ...
/var/lib/dpkg/info/puppetserver.postinst: 3: /var/lib/dpkg/info/puppetserver.postinst: /usr/share/puppetserver/scripts/install.sh: not found
dpkg: error processing package puppetserver (--configure):
subprocess installed post-installation script returned error exit status 127
function ConvertFrom-GlobalVariables {
param(
[hashtable]$ExpectedVariables,
[string]$ScriptPath
)
$ExpectedVariables.Keys | ForEach-Object {
Set-Variable -Name $_ -Value $ExpectedVariables[$_]
}
@elovelan
elovelan / 0_reuse_code.js
Created February 18, 2017 03:59
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@elovelan
elovelan / Convert-Mof2ToMof1.psd1
Created May 5, 2017 17:52
Convert MOF 2.0 to MOF 1.0 for PowerShell 4.0
param (
$filename
)
$instanceReplace = @{}
$instanceRemove = @("ConfigurationName")
$metadataReplace = @{
'Version="[0-9.]*"' = 'Version="1.0.0"'
}
$metadataRemove = @(
@elovelan
elovelan / choco_version_thoughts.md
Last active June 21, 2017 04:05
Chocolatey Versions thoughts

Been thinking a lot about this feature. I've been fighting with it quite a bit for installing SxS packages

Some examples of packages that can be sensibly installed side-by-side:

  • Ruby
  • microsoft-build-tools
  • sqlserver-odbcdriver

Here are some of the issues:

  • No automated upgrade path for point releases. e.g. if I have Ruby 1.9 and Ruby 2.4 installed, I can only upgrade Ruby 2.4, even if there's an update to 1.9
@elovelan
elovelan / Get-ParameterValues.ps1
Created October 10, 2018 19:05 — forked from Jaykul/Get-ParameterValues.ps1
Rather better than `$PSBoundParameters`
function Get-ParameterValues {
<#
.Synopsis
Get the actual values of parameters which have manually set (non-null) default values or values passed in the call
.Description
Unlike $PSBoundParameters, the hashtable returned from Get-ParameterValues includes non-empty default parameter values.
NOTE: Default values that are the same as the implied values are ignored (e.g.: empty strings, zero numbers, nulls).
.Link
https://gist.github.com/Jaykul/72f30dce2cca55e8cd73e97670db0b09/
.Link
@elovelan
elovelan / README.md
Created April 14, 2020 16:37 — forked from mbbx6spp/README.md
Gerrit vs Github for code review and codebase management

Gerrit vs Github: for code review and codebase management

Sure, Github wins on the UI. Hands down. But, despite my initial annoyance with Gerrit when I first started using it almost a year ago, I am now a convert. Fully. Let me tell you why.

Note: This is an opinionated (on purpose) piece. I assume your preferences are like mine on certain ideas, such as:

  • Fast-forward submits to the target branch are better than allowing merge commits to the target branch. The reason I personally prefer this is that, even if a non-conflicting merge to the target branch is possible, the fact that the review/pull request is not up to date with the latest on the target branch means feature branch test suite runs in the CI pipeline reporting on the review/PR may not be accurate. Another minor point is that forced merge commits are annoying as fuck (opinion) and clutter up Git log histories unnecessarily and I prefer clean histories.
  • Atomic/related changes all in one commit is something worth striving for. Having your dev