Skip to content

Instantly share code, notes, and snippets.


Ali Robertson alirobe

View GitHub Profile
dominictarr /
Created Nov 26, 2018
statement on event-stream compromise

Hey everyone - this is not just a one off thing, there are likely to be many other modules in your dependency trees that are now a burden to their authors. I didn't create this code for altruistic motivations, I created it for fun. I was learning, and learning is fun. I gave it away because it was easy to do so, and because sharing helps learning too. I think most of the small modules on npm were created for reasons like this. However, that was a long time ago. I've since moved on from this module and moved on from that thing too and in the process of moving on from that as well. I've written way better modules than this, the internet just hasn't fully caught up.


otherwise why would he hand over a popular package to a stranger?

If it's not fun anymore, you get literally nothing from maintaining a popular package.

One time, I was working as a dishwasher in a restu

alirobe / PostToUrlAsJson.cs
Last active Oct 13, 2020
Umbraco Forms Workflow - POST to URL as JSON (with optional Bearer Access Token). Just place this file anywhere in your Umbraco+Forms project, and the dependency injection will pick it up. This will allow you to connect to Microsoft Flow or Zapier or any integration web service, from which you can send to Salesforce/Dynamics/etc.
View PostToUrlAsJson.cs
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Dynamic;
using System.Net;
using System.Text.RegularExpressions;
using Umbraco.Core.Logging;
using Umbraco.Forms.Core;
using Umbraco.Forms.Core.Attributes;
alonronin / recurssive.tree.js
Last active Apr 22, 2021
Create recursive tree from json using lodash transform without recursion. Can have unlimited nesting.
View recurssive.tree.js
var _ = require('lodash');
var arr = [
{"name":"my2child1","title":"My 2 Child 1","parent":"my2"},
{"name":"my2child2","title":"My 2 Child 2","parent":"my2"},
{"name":"parent","title":"A single parent"},
{"name":"child-parent","title":"A child parent","parent":"child1"},
{"name":"child1","title":"Child 1","parent":"my"},
glapointe / Connect-SPOSite.ps1
Created Mar 31, 2015
Utility function for connecting to a SharePoint Online Site Collection using the SharePoint CSOM API and PowerShell.
View Connect-SPOSite.ps1
function global:Connect-SPOSite {
param (
[Parameter(Mandatory=$true, ValueFromPipeline=$true, Position=0)]
begin {
[System.Reflection.Assembly]::LoadFile("C:\Program Files\SharePoint Online Management Shell\Microsoft.Online.SharePoint.PowerShell\Microsoft.SharePoint.Client.dll") | Out-Null
[System.Reflection.Assembly]::LoadFile("C:\Program Files\SharePoint Online Management Shell\Microsoft.Online.SharePoint.PowerShell\Microsoft.SharePoint.Client.Runtime.dll") | Out-Null
glapointe / Load-CSOMProperties.ps1
Created Mar 31, 2015
Utility PowerShell function that facilitates the loading of specific properties of a Microsoft.SharePoint.Client.ClientObject object or Microsoft.SharePoint.Client.ClientObjectCollection object.
View Load-CSOMProperties.ps1
Facilitates the loading of specific properties of a Microsoft.SharePoint.Client.ClientObject object or Microsoft.SharePoint.Client.ClientObjectCollection object.
Replicates what you would do with a lambda expression in C#.
For example, "ctx.Load(list, l => list.Title, l => list.Id)" becomes
"Load-CSOMProperties -object $list -propertyNames @('Title', 'Id')".
Load-CSOMProperties -parentObject $web -collectionObject $web.Fields -propertyNames @("InternalName", "Id") -parentPropertyName "Fields" -executeQuery
$web.Fields | select InternalName, Id
IAMIronmanSam / bootstrap-custom.js
Created Mar 5, 2015
Custom for sharepoint specific
View bootstrap-custom.js
jQuery(document).ready(function($) {
specific browsers may require specific fixes
function BindBrowserStyles($) {
IAMIronmanSam / bootstrap-custom.css
Created Mar 5, 2015
Custom bootstrap for sharepoint specific
View bootstrap-custom.css
/*bootstrap 3 resets for SharePoint*/
/*border-box causes many issues with SP*/
*, *:before, *:after {
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
/*reset elements that B3 is expecting to be border-box*/
* [class^="col-"], * [class^="col-"]:before, * [class^="col-"]:after,
.container, .container:before, .container:after,
marineko / infiniteScroll.js
Last active Apr 10, 2016
Infinite scroll SharePoint items
View infiniteScroll.js
var setArea = $('#loadarea'),
loadNum = 1, // 読み込む個数
loadTxt = 'Now Loading...', // Loading中の表示テキスト
fadeSpeed = 500; // フェードスピード
var onclickStr;
var txt;
url: "/[your site]/_api/web/lists/getbytitle('test')/items?$select=*",
View SP2010-chromeScrollingFix
//test for use in a chrome extension
function _loadsp() {
var interval;
function loopCheck() {
if (typeof (_spBodyOnLoadWrapper) !== "undefined" && _spBodyOnLoadCalled == false) {
console.log('applying sharepoint fix');
malarkey / Contract Killer
Last active May 7, 2021
The latest version of my ‘killer contract’ for web designers and developers
View Contract Killer

Contract Killer

The popular open-source contract for web professionals by Stuff & Nonsense

  • Originally published: 23rd December 2008
  • Revised date: March 15th 2016
  • Original post