Skip to content

Instantly share code, notes, and snippets.

Carl in 't Veld cveld

Block or report user

Report or block cveld

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@cveld
cveld / readiislog.scala
Created Jan 3, 2016 — forked from anonymous/readiislog.scala
First try to parse IIS (w3c extended format log files with Scala
View readiislog.scala
// http://stackoverflow.com/questions/1284423/read-entire-file-in-scala
//val source = scala.io.Source.fromFile("G:\\test\\2015-12 Logging Eventhub\\W3SVC916189047\\u_ex151130.log")
val source = scala.io.Source.fromFile("testlog.log")
val lines = source.getLines()
//getLogItems(lines).take(5).foreach { line => println(line) }
getLogItems(lines).foreach { line => println(line) }
class LogItemsIterator(lines : Iterator[String]) extends Iterator[collection.mutable.Map[String, String]] {
var _nextLine = None : Option[collection.mutable.Map[String, String]];
@cveld
cveld / ce_followedsites.html
Last active Jul 25, 2016
Client-side Content Editor / Script Editor include in order to extend the SharePoint 2013 content by search and search results webparts with a new token for filtering on followed sites by the active user
View ce_followedsites.html
<script type="text/javascript">
(function(){
// Content Editor / Script Editor include in order to extend the SharePoint 2013 content by search and search results webparts with a new token for filtering on followed sites by the active user
// (c) 2015 Carl in 't Veld
// dependencies: jQuery
// This script works by introducing two extensions on top existing SharePoint OOTB functions:
// 1. SP.ClientRuntimeContext
// Extending the function executeQueryAsync, we create a stack in the ClientRuntimeContext instance
@cveld
cveld / test.cs
Created Aug 9, 2018
A test for a new blog
View test.cs
using test;
class Happy {
void MyFunction(int i) {
test.Method(i);
}
}
@cveld
cveld / Crawl_Android.ps1
Last active May 20, 2019
PowerShell that crawls your Android usb folder structure
View Crawl_Android.ps1
# http://blogs.technet.com/b/heyscriptingguy/archive/2013/04/26/use-powershell-to-work-with-windows-explorer.aspx
$o = New-Object -com Shell.Application
$folder = $o.NameSpace(0x11)
# https://msdn.microsoft.com/en-us/library/windows/desktop/bb774096(v=vs.85).aspx
# ShellSpecialFolderConstants.ssfDRIVES == 0x11
$items = $folder.Items()
for ($i= 0; $i -lt $items.Count; $i++) {
write-output ([string]$i + ": " + $items.Item($i).Name)
You can’t perform that action at this time.