Skip to content

Instantly share code, notes, and snippets.

@malcolmgreaves
malcolmgreaves / git-largest-files
Last active January 10, 2024 12:44 — forked from nk9/largestFiles.py
Python script to find the largest files in a git repository.
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Updated to use Python 3 by Malcolm Greaves.
#
# Python script to find the largest files in a git repository.
# The general method is based on the script in this blog post:
# http://stubbisms.wordpress.com/2009/07/10/git-script-to-show-largest-pack-objects-and-trim-your-waist-line/
#
# The above script worked for me, but was very slow on my 11GB repository. This version has a bunch
@nickwesselman
nickwesselman / item-odata.js
Last active February 27, 2018 13:00
Headless on Sitecore 9 Examples
/* Using the Sitecore 9 Item OData service with odata.js */
var o = require('odata');
var moment = require('moment');
o().config({
endpoint: 'http://symheadless.local/sitecore/api/ssc/aggregate/content/',
appending: [
{ name: 'sc_apikey', value: 'D510CB0F-B2EF-4224-8F7A-7F04C020BDFE' }
]
@deniskyashif
deniskyashif / Global.Application_Start.cs
Last active January 30, 2020 19:54
Integrate OpenGraph and TwitterCard with Sitefinity
protected void Application_Start(object sender, EventArgs e)
{
Bootstrapper.Initialized += this.BootstrapperInitializedHook;
}
@andris9
andris9 / mandrill.js
Last active August 10, 2022 20:38
Nodemailer using Mandrill
'use strict';
// Nodemailer: v2.0.0
// Ubuntu: 14.04
// node: v5.5.0
// npm: 3.3.12
var nodemailer = require('nodemailer');
var transporter = nodemailer.createTransport({
service: 'Mandrill',
@stevewithington
stevewithington / mura-tabs-as-links.cfm
Created March 6, 2015 17:00
Mura CMS: How to create Bootstrap tabs of children content as either links, or with panels.
@MWers
MWers / x-forwarded-for.cfm
Created April 4, 2014 04:16
Use X-Forwarded-For address if it exists, otherwise use cgi.remote_addr
<cfset req = GetHttpRequestData() />
<cfif structKeyExists(req.headers, "X-Forwarded-For")
AND Len(Trim(req.headers["X-Forwarded-For"])) GT 0>
<cfset ipAddress = req.headers["X-Forwarded-For"] />
<cfelse>
<cfset ipAddress = cgi.remote_addr />
</cfif>
@sitefinitysteve
sitefinitysteve / CollectionExtensions.cs
Last active June 10, 2020 01:45
SitefinitySteve Extension Collection, included in the RandomSiteControls
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace Telerik.Sitefinity
{
public static class CollectionExtensions
{
/// <summary>
@CristinaSolana
CristinaSolana / gist:1885435
Created February 22, 2012 14:56
Keeping a fork up to date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@davejlong
davejlong / search.cfm
Created July 8, 2011 14:51
Mura CMS default search form
<form action="" id="searchForm">
<fieldset>
<input type="text" name="Keywords" id="txtKeywords" class="text" value="Search" onfocus="this.value=(this.value=='Search') ? '' : this.value;" onblur="this.value=(this.value=='') ? 'Search' : this.value;" />
<input type="hidden" name="display" value="search" />
<input type="hidden" name="newSearch" value="true" />
<input type="hidden" name="noCache" value="1" />
<input type="submit" class="submit" value="Go" />
</fieldset>
</form>
@davejlong
davejlong / cfscp.cfc
Created May 18, 2011 13:46
SCP Functionality within ColdFusion using the SFTP
<cfcomponent displayname="CF SCP" hint="Handles SCP style functionality within ColdFusion" output="false">
<cfproperty name="scpserver" hint="Remote server to send files to" type="string" />
<cfproperty name="username" hint="Username for access to the remote server" type="struct" />
<cfproperty name="password" hint="Password of the remote server (required if not using private key authentication)" type="string" />
<cfproperty name="key" hint="Path to private key for private key authentication" type="string" />
<cfproperty name="connection" type="any" />
<!--- #### Object Constructor #### --->
<cffunction name="init" hint="Object constructor" access="public" output="false" returntype="any">
<cfargument name="server" type="string" required="false" default="" />