string line;
// Read the file and display it line by line.
using (StreamReader file = new StreamReader(@"D:\$R3D4NK0.log"))
{
var lineCount = 0;
while ((line = file.ReadLine()) != null && lineCount < 25)
{
Console.WriteLine(line);
Install Chocolatey from an elevated PowerShell prompt.
iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
Then install ConsoleZ
choco install consolez
console.exe can now be found in C:\ProgramData\chocolatey\bin
USE XXX_Master | |
-- Find items that don't have a template set. | |
SELECT TOP 10 * | |
FROM Items mi | |
LEFT JOIN Items ti ON mi.TemplateID = ti.ID | |
WHERE ti.ID IS NULL |
void Main() | |
{ | |
// Can run in LINQPad. | |
var directory = @"C:\Users\James\Projects\directory" + Path.DirectorySeparatorChar; | |
parsePngFiles(directory); | |
} | |
// Define other methods and classes here | |
void parsePngFiles(string directory) |
1. Create Git repo: https://github.com/JamesSkemp/blog.git
2. Clone locally:
C:\Users\James\Projects> git clone https://github.com/JamesSkemp/blog.git
3. .\hugo.exe new site blog --force
4. cd blog
5a. Create content\posts\ and put file within
5b. Could also run ..\hugo.exe new posts\test.md and then either switch from draft or have Hugo check drafts
6. ..\hugo.exe server
7. Test site (doesn't work / blank)
// For running in LINQPad. | |
var typesToExclude = new List<string>() { "nav_menu_item", "attachment" }; | |
var typesToInclude = new List<string>() { "page", "post" }; | |
var searchTerm = "example.com/wp-content/uploads"; | |
var xmlPath = @"C:\Users\jskemp\Downloads\example.wordpress.2016-01-22.xml"; | |
var xml = XDocument.Load(xmlPath); |
The following is how I configured a Raspberry Pi 2 as a samba server, using a Seagate Backup Plus Slim, 1TB, drive.
For ease I purchased the CanaKit Raspberry Pi 2 Complete Starter Kit. It runs about $70 and includes enough to get up and running with the Raspberry Pi 2, with the Pi itself, a nice case, power supply, HDMI cable, WiFi adapter, and SD card with NOOBS/Raspbian installer.
For the hard drive I opted to purchase a Seagate Backup Plus Slim 1TB Portable External Hard Drive, since I've had good enough luck with Seagate in the past, and reviews are generally favorable. This ran me $60. I confirmed that it worked fine on my Windows 10 machine, and was already formatted to NTFS.
Unfortunately, once I received the Pi and drive I found that the power supply/Pi wasn't putting off enough power to keep the drive running. After looking at the options, including tweaking the Pi to pass throu
// Run the following in your browser's console, after page load. | |
// Works as of 1/8/2016 on https://academy.zenva.com. | |
$('#sidebar').hide();$('#main').css('width', '95%'); |
// Run the following command in developer tools. Links will now go to the list's RSS feed, for easy exporting. | |
$('#main .your_lists table.lists td.name a').each(function() { var originalHref = $(this).attr('href'); console.log(originalHref); $(this).attr('href', 'http://rss.imdb.com' + originalHref); }); | |
/* XPath on XML to verify the RSS contains all items. | |
count(//rss/channel/item) | |
*/ |