Skip to content

Instantly share code, notes, and snippets.

@cohen990
cohen990 / leaf.grp
Created Nov 18, 2015
Example of graph output
View leaf.grp
!"Leaf" - https://www.wikipedia.org/wiki/Leaf#Large-scale_features_.28leaf_morphology.29
2: "determinate"
2: "kinds"
3: "primary"
2: "cylindrical"
3: "shade"
1: "continue"
46: "plant"
7: "features"
2: "petals"
View temp
int max = 0;
for(int i = 0; i < myArray.length; i++){
if(myArray[i] > max){
max = myArray[i];
}
}
int maxIndex = 0;
View Interface Example
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication1
{
class Program
{
View Scalable circles kata
Kata:
Print out a scalable circle on the command line.
program takes a diameter as an input
input 1: output: o
input 2: output: ()
View gist:ca4fbbc99ab6773f450d
[user]
name = Dan Cohen
email = dancohen447@gmail.com
[color "branch"]
upstream = bold magenta
[alias]
s = status
b = branch
pu = pull upstream
pl = pull --rebase
View linux .gitconfig
[user]
name = Dan Cohen
email = dan.cohen@euromoneyplc.com
[color "branch"]
upstream = bold magenta
[alias]
s = status
b = branch
pu = pull upstream
pl = pull --rebase
@cohen990
cohen990 / Export Log CFC
Created Apr 13, 2015
CFC Failed export log
View Export Log CFC
C:\Users\Dan\Documents\GitHub\MoPowered.Morph\src\MoPowered.Morph.CLI\bin\Debug>MoPowered.
Morph.CLI.exe x -c=catalogues/5025 -v=true
Exporting catalogue with ID: 'catalogues/5025'
INFO: Exporting 1449 Products from Catalogue 'catalogues/5025' for Clifton Collectables.
System.AggregateException: One or more documents caused format exceptions. See InnerExcept
ions for details.
at MoPowered.Morph.Data.Validation.ValidationExtensions.ValidateCatalogue[TProduct](Cat
alogue`1 catalogue, IOutputProvider output) in c:\Users\Dan\Documents\GitHub\MoPowered.Mor
ph\src\MoPowered.Morph\Data\Validation\ValidationExtensions.cs:line 24
at MoPowered.Morph.Services.CatalogueExportService.<ExportCatalogueAsync>d__2.MoveNext(
@cohen990
cohen990 / MNS-log
Created Apr 7, 2015
The full log for the MNS scrape after fixing all the errors being thrown
View MNS-log
15-08-07 14:08:02: INFO: Logging Exceptions to 'C:\Users\Dan\Desktop\morph-bin-copy\Debug\2015-04-07 14-08 MorphErrors.txt
15-08-07 14:08:02: Queueing Job 'Creating monster slippers catalogue' on Queue 'MNS-d10e7715'
15-08-07 14:08:15: INFO: Logging Exceptions to 'C:\Users\Dan\Desktop\morph-bin-copy\Debug\2015-04-07 14-08 MorphErrors.txt
15-08-07 14:08:15: INFO: Processing Messages for Queue 'MNS-d10e7715'.
15-08-07 14:08:16: Processing: 'Creating monster slippers catalogue'.
15-08-07 14:08:17: Processing: 'Job (ScrapeHomePageJob)'.
15-08-07 14:08:25: Processing: 'Store Category Node 'home' for Catalogue 'catalogues/4289'.'.
15-08-07 14:08:25: Processing: 'Store Category 'Home' for Catalogue 'catalogues/4289''.
15-08-07 14:08:25: Adding Category 'Home' to Catalogue 'catalogues/4289'.
15-08-07 14:08:25: Processing: 'Store Category Node 'for-him-c-57' for Catalogue 'catalogues/4289'.'.
View HtmlLoader.cs
using MoPowered.Morph.Tests.Utility;
namespace MoPowered.Morph.Tests.Merchants.ExecutiveShaving.Scraping
{
public class HtmlLoader
{
public static string Formatted
{
get
{
View DirectHtml
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Traditional Cut Throat Razors & Shaving Products | Executive Shaving</title>
<meta name="description" content="Gentlemen of distinction barber with the Executive Shaving Company. Have a revitalising shave with our cut throat razors, shaving soaps and shaving brushes.">
<meta name="keywords" content="Traditional Cut Throat Razors & Shaving Products | Executive Shaving">
<meta name="title" content="Traditional Cut Throat Razors & Shaving Products | Executive Shaving">
<base href="http://www.executive-shaving.co.uk/">