Skip to content

Instantly share code, notes, and snippets.

View Mattlk13's full-sized avatar

Matthew Krebs Mattlk13

  • All Your Computer Solutions
  • Belton, Mo
View GitHub Profile
#requires -Modules Configuration, Pester, PSScriptAnalyzer
[CmdletBinding()]
[OutputType()]
$ErrorActionPreference = "Stop"
try {
# Setup environment.
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Confirm:$false -Force |
@Mattlk13
Mattlk13 / count.php
Created February 15, 2017 09:29 — forked from tylerhall/count.php
A quick PHP script to count the total number of words written in your Day One journal file.
<?PHP
$journal_fn = $argv[1];
$entries_dir = $journal_fn . '/entries/';
$entries = scandir($entries_dir);
print_r($entries);
$total_words = 0;
@Mattlk13
Mattlk13 / count.php
Created February 15, 2017 09:29 — forked from tylerhall/count.php
A quick PHP script to count the total number of words written in your Day One journal file.
<?PHP
$journal_fn = $argv[1];
$entries_dir = $journal_fn . '/entries/';
$entries = scandir($entries_dir);
print_r($entries);
$total_words = 0;
@Mattlk13
Mattlk13 / jekyll-import.php
Created February 15, 2017 05:28 — forked from songzhou21/jekyll-import.php
Import a Jekyll posts directory into WordPress
<?PHP
require '/path/to/markdown-extra.php';
$db = mysql_connect('localhost', 'root', 'password') or die(mysql_error());
mysql_select_db('tylerio', $db) or die(mysql_error());
$files = scandir('posts');
array_shift($files); // .
array_shift($files); // ..