Skip to content

Instantly share code, notes, and snippets.

View marcusoftnet's full-sized avatar

Marcus Hammarberg marcusoftnet

View GitHub Profile
marcusoftnet /
Created August 26, 2021 12:07
Bash challenge from real life - part I; which licenses are used in all our code, including dependencies
#!/usr/bin/env zsh
# The challenge is to understand which licenses we are indirectly including, by just getting a list of tool and license
# I'm thinking to post process this later, summarizing, sorting and aggregating in Google Sheets.
# For now I just want to get a list
# This assumest that all relevant repositories to be local directory in the current folder.
## Part I - install all dependencies for all repositories (i.e. all subfolders one level deep from .)
marcusoftnet / TinyIoCAndWCF
Created July 12, 2011 18:33
An implementation to get IoC support for WCF Services using TinyIoC (shamelessly stealing from Jimmy Bogard :))
using System;
using System.Collections.ObjectModel;
using System.ServiceModel;
using System.ServiceModel.Activation;
using System.ServiceModel.Channels;
using System.ServiceModel.Description;
using System.ServiceModel.Dispatcher;
* This is an TinyIoC implemention of the example in the excellent blog post by Jimmy Boggard
# Employee records
- martin:
name: Martin D'vloper
job: Developer
- python
- perl
- pascal
- tabitha:
name: Tabitha Bitumen
marcusoftnet / scaffold_post
Last active July 7, 2016 22:57
Jekyll Post Scaffolder
#--------|- Jekyll Post Creator -|--------#
# Ripped and tweaked from
# Simply put the script in your site directory, edit the configs to fit your setup, and run it with:
# ./post "post title"
"context" : {
"path" : "/user",
"method" : "POST"
"userId": "123",
"name": "Marcus Hammarberg",
"age": "43"
marcusoftnet / anAttemptToResolve.js
Last active February 27, 2016 11:20
Promises... Aaaaah
/*global require, module*/
var ApiBuilder = require('claudia-api-builder'),
api = new ApiBuilder(),
Promise = require('bluebird');
module.exports = api;
// use a promise for asynchronous processing
api.get('/greet/{name}', function(request) {
'use strict';
marcusoftnet / config.js
Created April 21, 2014 13:37
var mongoDevUri = process.env.MONGOHQ_URL || "localhost:27017/koaVote_Dev";
var mongoStageUri = process.env.MONGOHQ_URL || "localhost:27017/koaVote_Test";
var mongoProdUri = process.env.MONGOHQ_URL || "localhost:27017/koaVote_Prod";
var config = {
local: {
mode: 'local',
port: 3000,
mongoUrl: mongoDevUri
marcusoftnet / createHotspot.bat
Created January 21, 2014 06:39
Set up a shared WiFi
netsh wlan set hostednetwork ssid=[your network name here] key=[your password here]
netsh wlan start hostednetwork
marcusoftnet / TestingViewFactory.cs
Created September 19, 2013 08:01
using Nancy;
using Nancy.Testing;
using Nancy.ViewEngines;
namespace ItemVariants.Admin.Tests.Utils
// From
public class TestingViewFactory : IViewFactory
@powershell -NoProfile -ExecutionPolicy unrestricted -Command
"iex ((new-object net.webclient).DownloadString(''))"